Spaces:
Running
Running
NML RAG
#11
by SabarishG - opened
- .gitattributes +0 -1
- .gitignore +0 -1
- app.py +1 -1
- corpus_query.py +2 -5
- {store/embed_openai → openworm.ai_store}/default__vector_store.json +2 -2
- openworm.ai_store/docstore.json +3 -0
- openworm.ai_store/graph_store.json +3 -0
- openworm.ai_store/image__vector_store.json +3 -0
- openworm.ai_store/index_store.json +3 -0
- requirements.txt +1 -1
- store/embed_openai/docstore.json +0 -0
- store/embed_openai/graph_store.json +0 -1
- store/embed_openai/image__vector_store.json +0 -1
- store/embed_openai/index_store.json +0 -0
.gitattributes
CHANGED
|
@@ -38,4 +38,3 @@ openworm.ai_store/docstore.json filter=lfs diff=lfs merge=lfs -text
|
|
| 38 |
openworm.ai_store/graph_store.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
openworm.ai_store/image__vector_store.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
openworm.ai_store/index_store.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
-
store/embed_openai/default__vector_store.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 38 |
openworm.ai_store/graph_store.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
openworm.ai_store/image__vector_store.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
openworm.ai_store/index_store.json filter=lfs diff=lfs merge=lfs -text
|
|
|
.gitignore
CHANGED
|
@@ -5,4 +5,3 @@
|
|
| 5 |
/report.Sim_IClamp_GenericMuscleCell.txt
|
| 6 |
/report.Sim_IClamp_GenericNeuronCell.txt
|
| 7 |
*v.dat
|
| 8 |
-
/copy_latest.sh
|
|
|
|
| 5 |
/report.Sim_IClamp_GenericMuscleCell.txt
|
| 6 |
/report.Sim_IClamp_GenericNeuronCell.txt
|
| 7 |
*v.dat
|
|
|
app.py
CHANGED
|
@@ -14,7 +14,7 @@ from openworm_ai.utils.llms import OPENAI_LLMS
|
|
| 14 |
|
| 15 |
import socket
|
| 16 |
|
| 17 |
-
__version__ = "0.
|
| 18 |
|
| 19 |
|
| 20 |
def requires_openai_key(llm_ver):
|
|
|
|
| 14 |
|
| 15 |
import socket
|
| 16 |
|
| 17 |
+
__version__ = "0.5.4"
|
| 18 |
|
| 19 |
|
| 20 |
def requires_openai_key(llm_ver):
|
corpus_query.py
CHANGED
|
@@ -17,8 +17,7 @@ LLM_GPT4o = "GPT4o"
|
|
| 17 |
def print_(text):
|
| 18 |
print(text)
|
| 19 |
|
| 20 |
-
|
| 21 |
-
'''
|
| 22 |
def load_index(model):
|
| 23 |
OLLAMA_MODEL = model.replace("Ollama:", "") if model is not LLM_GPT4o else None
|
| 24 |
|
|
@@ -44,7 +43,7 @@ def load_index(model):
|
|
| 44 |
|
| 45 |
index_reloaded = load_index_from_storage(storage_context)
|
| 46 |
|
| 47 |
-
return index_reloaded
|
| 48 |
|
| 49 |
|
| 50 |
def get_query_engine(index_reloaded, model, similarity_top_k=4):
|
|
@@ -132,7 +131,6 @@ def process_query(query, model=llm_ver):
|
|
| 132 |
files_used = []
|
| 133 |
for sn in response.source_nodes:
|
| 134 |
# print(sn)
|
| 135 |
-
print(sn.metadata)
|
| 136 |
sd = sn.metadata["source document"]
|
| 137 |
if "et_al_" in sd:
|
| 138 |
sd = sd.replace("WormAtlas Handbook:", "Paper: ")
|
|
@@ -184,7 +182,6 @@ if __name__ == "__main__":
|
|
| 184 |
queries = [
|
| 185 |
"What are the main types of neurons and muscles in the C. elegans pharynx?",
|
| 186 |
"Tell me about the egg laying apparatus",
|
| 187 |
-
"Tell me about locomotion in C. elegans",
|
| 188 |
]
|
| 189 |
|
| 190 |
for query in queries:
|
|
|
|
| 17 |
def print_(text):
|
| 18 |
print(text)
|
| 19 |
|
| 20 |
+
|
|
|
|
| 21 |
def load_index(model):
|
| 22 |
OLLAMA_MODEL = model.replace("Ollama:", "") if model is not LLM_GPT4o else None
|
| 23 |
|
|
|
|
| 43 |
|
| 44 |
index_reloaded = load_index_from_storage(storage_context)
|
| 45 |
|
| 46 |
+
return index_reloaded
|
| 47 |
|
| 48 |
|
| 49 |
def get_query_engine(index_reloaded, model, similarity_top_k=4):
|
|
|
|
| 131 |
files_used = []
|
| 132 |
for sn in response.source_nodes:
|
| 133 |
# print(sn)
|
|
|
|
| 134 |
sd = sn.metadata["source document"]
|
| 135 |
if "et_al_" in sd:
|
| 136 |
sd = sd.replace("WormAtlas Handbook:", "Paper: ")
|
|
|
|
| 182 |
queries = [
|
| 183 |
"What are the main types of neurons and muscles in the C. elegans pharynx?",
|
| 184 |
"Tell me about the egg laying apparatus",
|
|
|
|
| 185 |
]
|
| 186 |
|
| 187 |
for query in queries:
|
{store/embed_openai → openworm.ai_store}/default__vector_store.json
RENAMED
|
@@ -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:b17d623e2545c0002179e00586be424dbd4f276035c60fdd70b9aa6b5d26f827
|
| 3 |
+
size 13814331
|
openworm.ai_store/docstore.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9aa142d8cefc9eb374dbe6f73074858fa50352249f3444defbfc9900cdb9dca
|
| 3 |
+
size 2296208
|
openworm.ai_store/graph_store.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e0a77744010862225c69da83c585f4f8a42fd551b044ce530dbb1eb6e16742c
|
| 3 |
+
size 18
|
openworm.ai_store/image__vector_store.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d17ed74c1649a438e518a8dc56a7772913dfe1ea7a7605bce069c63872431455
|
| 3 |
+
size 72
|
openworm.ai_store/index_store.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02acbe0ae1926e1192c6110b15767773d6f50a61c6d802595be410fc6f67dff4
|
| 3 |
+
size 33511
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
|
| 2 |
-
openworm_ai[dev]>=0.
|
| 3 |
openai
|
| 4 |
asyncio
|
| 5 |
wormneuroatlas
|
|
|
|
| 1 |
|
| 2 |
+
openworm_ai[dev]>=0.3.1
|
| 3 |
openai
|
| 4 |
asyncio
|
| 5 |
wormneuroatlas
|
store/embed_openai/docstore.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
store/embed_openai/graph_store.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
{"graph_dict": {}}
|
|
|
|
|
|
store/embed_openai/image__vector_store.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
{"embedding_dict": {}, "text_id_to_ref_doc_id": {}, "metadata_dict": {}}
|
|
|
|
|
|
store/embed_openai/index_store.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|