Spaces:
Running
Running
push new db or demo version
Browse files- dump.rdb +2 -2
- src/app.py +15 -5
- src/service.py +1 -1
dump.rdb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16861118d59e4eacb5e71adab32e809eccf713381da4f9e83c3a7a5e3554736c
|
3 |
+
size 2454945
|
src/app.py
CHANGED
@@ -113,12 +113,22 @@ class App:
|
|
113 |
gr.Markdown("""
|
114 |
# 🧪 Chem-MRL: Molecular Similarity Search Demo
|
115 |
|
116 |
-
Use the JSME editor to draw a molecule or input a SMILES string
|
117 |
-
The backend encodes the molecule using the Chem-MRL model to produce a vector embedding
|
118 |
-
Similarity search is performed via an HNSW-indexed Redis vector store to retrieve closest matches
|
119 |
-
|
120 |
-
[Model Repo](https://github.com/emapco/chem-mrl) | [Demo Repo](https://github.com/emapco/chem-mrl-demo)
|
121 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
with gr.Tab("🔬 Molecular Search"), gr.Row():
|
123 |
with gr.Column(scale=1):
|
124 |
gr.Markdown("### Molecule Input")
|
|
|
113 |
gr.Markdown("""
|
114 |
# 🧪 Chem-MRL: Molecular Similarity Search Demo
|
115 |
|
116 |
+
Use the JSME editor to draw a molecule or input a SMILES string.<br/>
|
117 |
+
The backend encodes the molecule using the Chem-MRL model to produce a vector embedding.<br/>
|
118 |
+
Similarity search is performed via an HNSW-indexed Redis vector store to retrieve closest matches.
|
|
|
|
|
119 |
""")
|
120 |
+
gr.HTML(
|
121 |
+
"""
|
122 |
+
The Redis database indexes a curated subset of molecules from <a href="https://isomerdesign.com/pihkal/home">Isomer Design</a>
|
123 |
+
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
|
124 |
+
<img src="https://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by-nc-sa.svg" alt="License: CC BY-NC-SA 4.0"
|
125 |
+
style="display:inline; height:15px; vertical-align:middle; margin-left:4px;"/>
|
126 |
+
</a>""", # noqa: E501
|
127 |
+
padding=False,
|
128 |
+
)
|
129 |
+
gr.Markdown(
|
130 |
+
"[Model Repo](https://github.com/emapco/chem-mrl) | [Demo Repo](https://github.com/emapco/chem-mrl-demo)"
|
131 |
+
)
|
132 |
with gr.Tab("🔬 Molecular Search"), gr.Row():
|
133 |
with gr.Column(scale=1):
|
134 |
gr.Markdown("### Molecule Input")
|
src/service.py
CHANGED
@@ -92,7 +92,7 @@ class MolecularEmbeddingService:
|
|
92 |
|
93 |
def _initialize_datastore(self):
|
94 |
self.__create_hnsw_index()
|
95 |
-
self.__populate_sample_data(DATASET_SMILES)
|
96 |
self.__populate_sample_data(ISOMER_DESIGN_SUBSET)
|
97 |
|
98 |
def __create_hnsw_index(self):
|
|
|
92 |
|
93 |
def _initialize_datastore(self):
|
94 |
self.__create_hnsw_index()
|
95 |
+
# self.__populate_sample_data(DATASET_SMILES)
|
96 |
self.__populate_sample_data(ISOMER_DESIGN_SUBSET)
|
97 |
|
98 |
def __create_hnsw_index(self):
|