eacortes commited on
Commit
2aba70a
·
1 Parent(s): 289089c

push new db or demo version

Browse files
Files changed (4) hide show
  1. dump.rdb +3 -0
  2. requirements.txt +2 -2
  3. src/constants.py +4 -4
  4. src/static/main.min.js +1 -1
dump.rdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62def81910d0f42cad3d6b8212b8be08ee4b4e73d5ccfd78dd7de195a8eac200
3
+ size 66401991
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- chem-mrl==0.6.0
2
  gradio[mcp]>=4.0.0
3
  transformers>=4.30.0
4
  torch>=2.0.0
@@ -9,4 +9,4 @@ python-dotenv>=1.0.0
9
  scikit-learn>=1.3.0
10
  rdkit>=2025.3.2
11
  pytest
12
- datasets
 
1
+ chem-mrl>=0.7.3
2
  gradio[mcp]>=4.0.0
3
  transformers>=4.30.0
4
  torch>=2.0.0
 
9
  scikit-learn>=1.3.0
10
  rdkit>=2025.3.2
11
  pytest
12
+ datasets==3.6.0
src/constants.py CHANGED
@@ -1,6 +1,6 @@
1
  # Model config
2
- MODEL_NAME = "Derify/ChemMRL-alpha"
3
- SUPPORTED_EMBEDDING_DIMENSIONS = [1024, 768, 512, 256, 128, 64, 32, 16]
4
  EMBEDDING_DIMENSION = max(SUPPORTED_EMBEDDING_DIMENSIONS)
5
  USE_HALF_PRECISION = True
6
 
@@ -14,10 +14,10 @@ HNSW_PARAMETERS = {
14
  # Defines the initial capacity of the vector index. It helps in pre-allocating space for the index.
15
  "INITIAL_CAP": 15400,
16
  # Max number of outgoing edges (connections) for each node in a graph layer.
17
- "M": 32,
18
  # Max number of connected neighbors to consider during graph building.
19
  # Higher values increase accuracy, but also increase index build time.
20
- "EF_CONSTRUCTION": 512,
21
  # Max top candidates during KNN search. Higher values increase accuracy, but also increase search latency.
22
  "EF_RUNTIME": HNSW_K,
23
  }
 
1
  # Model config
2
+ MODEL_NAME = "Derify/ChemMRL-beta"
3
+ SUPPORTED_EMBEDDING_DIMENSIONS = [1024, 512, 256, 128, 64, 32, 16, 8]
4
  EMBEDDING_DIMENSION = max(SUPPORTED_EMBEDDING_DIMENSIONS)
5
  USE_HALF_PRECISION = True
6
 
 
14
  # Defines the initial capacity of the vector index. It helps in pre-allocating space for the index.
15
  "INITIAL_CAP": 15400,
16
  # Max number of outgoing edges (connections) for each node in a graph layer.
17
+ "M": 256,
18
  # Max number of connected neighbors to consider during graph building.
19
  # Higher values increase accuracy, but also increase index build time.
20
+ "EF_CONSTRUCTION": 4096,
21
  # Max top candidates during KNN search. Higher values increase accuracy, but also increase search latency.
22
  "EF_RUNTIME": HNSW_K,
23
  }
src/static/main.min.js CHANGED
@@ -1 +1 @@
1
- function initializeChemWriter(){try{setupSmilesTextboxEventListeners(),setupChemWriterEventListeners(),editor.setSMILES(DEFAULT_SMILES),setTimeout((()=>document.getElementById("search_btn")?.click()),500)}catch(e){}}function updateGradioTextbox(){try{const e=document.querySelector(MOL_INPUT_SELECTOR),t=editor?.getMolfile();e.value=t,GRADIO_CHANGE_EVENTS.forEach((t=>{const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)}))}catch(e){}}function updateChemWriterFromTextbox(e){try{e=e.trim(),editor?.setSMILES(e)}catch(e){}}function setupSmilesTextboxEventListeners(){const e=document.querySelector(SMILES_INPUT_SELECTOR);e&&(e.addEventListener("input",handleTextboxChange),e.addEventListener("change",handleTextboxChange),e.addEventListener("paste",handleTextboxPaste))}function setupChemWriterEventListeners(){window.addEventListener("resize",(()=>editor.jd())),editor.addEventListener("document-edited",updateGradioTextbox)}function handleTextboxChange(e){updateChemWriterFromTextbox(e.target.value)}function handleTextboxPaste(e){setTimeout((()=>{updateChemWriterFromTextbox(e.target.value)}),50)}function initializeWhenReady(){chemwriter=window?.chemwriter,chemwriter?.System?.De(),editor=chemwriter?.components?.editor,void 0!==chemwriter?.System?.De&&void 0!==editor?chemwriter.System.ready(initializeChemWriter):setTimeout(initializeWhenReady,250)}let editor=null,chemwriter=null;const DEFAULT_SMILES="CN(C)CCC1=CNC2=C1C(=CC=C2)OP(=O)(O)O",SMILES_INPUT_SELECTOR="#smiles_input textarea, #smiles_input input",MOL_INPUT_SELECTOR="#mol_input textarea, #mol_input input",SEARCH_BUTTON_SELECTOR="#search_btn",PASTE_DELAY=50,INIT_RETRY_DELAY=250,GRADIO_CHANGE_EVENTS=["input","change"];window.setCWSmiles=function(e){updateChemWriterFromTextbox(e)},window.clearCW=function(){editor.setMolfile("\nCWRITER06142521562D\nCreated with ChemWriter - https://chemwriter.com\n 0 0 0 0 0 0 0 0 0 0999 V2000\nM END")},initializeWhenReady();
 
1
+ function initializeChemWriter(){try{setupSmilesTextboxEventListeners(),setupChemWriterEventListeners(),editor.setSMILES(DEFAULT_SMILES),setTimeout(()=>document.getElementById("search_btn")?.click(),500)}catch(e){}}function updateGradioTextbox(){try{const e=document.querySelector(MOL_INPUT_SELECTOR),t=editor?.getMolfile();e.value=t,GRADIO_CHANGE_EVENTS.forEach(t=>{const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)})}catch(e){}}function updateChemWriterFromTextbox(e){try{e=e.trim(),editor?.setSMILES(e)}catch(e){}}function setupSmilesTextboxEventListeners(){const e=document.querySelector(SMILES_INPUT_SELECTOR);e&&(e.addEventListener("input",handleTextboxChange),e.addEventListener("change",handleTextboxChange),e.addEventListener("paste",handleTextboxPaste))}function setupChemWriterEventListeners(){window.addEventListener("resize",()=>editor.jd()),editor.addEventListener("document-edited",updateGradioTextbox)}function handleTextboxChange(e){updateChemWriterFromTextbox(e.target.value)}function handleTextboxPaste(e){setTimeout(()=>{updateChemWriterFromTextbox(e.target.value)},50)}function initializeWhenReady(){chemwriter=window?.chemwriter,chemwriter?.System?.De(),editor=chemwriter?.components?.editor,void 0!==chemwriter?.System?.De&&void 0!==editor?chemwriter.System.ready(initializeChemWriter):setTimeout(initializeWhenReady,250)}let editor=null,chemwriter=null;const DEFAULT_SMILES="CN(C)CCC1=CNC2=C1C(=CC=C2)OP(=O)(O)O",SMILES_INPUT_SELECTOR="#smiles_input textarea, #smiles_input input",MOL_INPUT_SELECTOR="#mol_input textarea, #mol_input input",SEARCH_BUTTON_SELECTOR="#search_btn",PASTE_DELAY=50,INIT_RETRY_DELAY=250,GRADIO_CHANGE_EVENTS=["input","change"];window.setCWSmiles=function(e){updateChemWriterFromTextbox(e)},window.clearCW=function(){editor.setMolfile("\nCWRITER06142521562D\nCreated with ChemWriter - https://chemwriter.com\n 0 0 0 0 0 0 0 0 0 0999 V2000\nM END")},initializeWhenReady();