Spaces:
Sleeping
Sleeping
maximka608
commited on
Commit
·
7fea419
1
Parent(s):
5748c97
split sentence
Browse files- app.py +0 -5
- faiss_index.faiss +2 -2
- metadata.json +2 -2
- preprocessing_text.json +2 -2
app.py
CHANGED
|
@@ -3,7 +3,6 @@ from utils.vector_base import KnowledgeBase
|
|
| 3 |
from utils.embedding import Embeddings
|
| 4 |
from utils.llm import LLM
|
| 5 |
from config import config
|
| 6 |
-
import json
|
| 7 |
|
| 8 |
|
| 9 |
def get_emdedding_model():
|
|
@@ -74,7 +73,6 @@ if __name__ == '__main__':
|
|
| 74 |
st.title("PaperRAG")
|
| 75 |
st.subheader("RAG system for scientific papers with selectable search types")
|
| 76 |
|
| 77 |
-
# User inputs
|
| 78 |
query = st.text_input("Enter your query")
|
| 79 |
search_types = st.multiselect(
|
| 80 |
"Select search types",
|
|
@@ -85,14 +83,11 @@ if __name__ == '__main__':
|
|
| 85 |
|
| 86 |
if st.button("Get Response"):
|
| 87 |
if query and llm_api_key:
|
| 88 |
-
# Call the main function
|
| 89 |
response, docs = main(query, search_types, llm_api_key)
|
| 90 |
|
| 91 |
-
# Show the LLM response
|
| 92 |
st.subheader("LLM Response:")
|
| 93 |
st.text_area("Response", value=response, height=300)
|
| 94 |
|
| 95 |
-
# Show combined documents
|
| 96 |
st.subheader("Citations:")
|
| 97 |
st.text_area("Documents", value=docs, height=300)
|
| 98 |
else:
|
|
|
|
| 3 |
from utils.embedding import Embeddings
|
| 4 |
from utils.llm import LLM
|
| 5 |
from config import config
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
def get_emdedding_model():
|
|
|
|
| 73 |
st.title("PaperRAG")
|
| 74 |
st.subheader("RAG system for scientific papers with selectable search types")
|
| 75 |
|
|
|
|
| 76 |
query = st.text_input("Enter your query")
|
| 77 |
search_types = st.multiselect(
|
| 78 |
"Select search types",
|
|
|
|
| 83 |
|
| 84 |
if st.button("Get Response"):
|
| 85 |
if query and llm_api_key:
|
|
|
|
| 86 |
response, docs = main(query, search_types, llm_api_key)
|
| 87 |
|
|
|
|
| 88 |
st.subheader("LLM Response:")
|
| 89 |
st.text_area("Response", value=response, height=300)
|
| 90 |
|
|
|
|
| 91 |
st.subheader("Citations:")
|
| 92 |
st.text_area("Documents", value=docs, height=300)
|
| 93 |
else:
|
faiss_index.faiss
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:e769a46a9e7667dade1e46e9441dd6bda19190f8630634ebdeacb669b3aaa11c
|
| 3 |
+
size 1625133
|
metadata.json
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:79856139bdacc1a1274797a170d6d1b29a46995a3889dd5177f42b72f317371f
|
| 3 |
+
size 1289336
|
preprocessing_text.json
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:4fd12d3bfc5b2f8bd133598c937809456ca0f389ff9f95a22edf99494f5403f3
|
| 3 |
+
size 797916
|