Spaces:
Running
Running
ubermenchh
commited on
Commit
•
86c2dcc
1
Parent(s):
1ff0039
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def paper_changes(paper_id):
|
|
17 |
paper = next(arxiv.Client().results(arxiv.Search(id_list=[paper_id])))
|
18 |
docs = SimpleDirectoryReader(input_files=[paper.download_pdf()]).load_data()
|
19 |
doc = Document(text='\n\n'.join([doc.text for doc in docs]))
|
20 |
-
llm = LangChainLLM(llm=HuggingFaceHub(repo_id=repo_id, model_kwargs={'temperature': 0.
|
21 |
service_context = ServiceContext.from_defaults(llm=llm, embed_model="local:BAAI/bge-small-en-v1.5")
|
22 |
index = VectorStoreIndex.from_documents([doc], service_context=service_context)
|
23 |
global query_engine
|
|
|
17 |
paper = next(arxiv.Client().results(arxiv.Search(id_list=[paper_id])))
|
18 |
docs = SimpleDirectoryReader(input_files=[paper.download_pdf()]).load_data()
|
19 |
doc = Document(text='\n\n'.join([doc.text for doc in docs]))
|
20 |
+
llm = LangChainLLM(llm=HuggingFaceHub(repo_id=repo_id, model_kwargs={'temperature': 0.2, 'max_tokens': 4096, 'top_p': 0.9}))
|
21 |
service_context = ServiceContext.from_defaults(llm=llm, embed_model="local:BAAI/bge-small-en-v1.5")
|
22 |
index = VectorStoreIndex.from_documents([doc], service_context=service_context)
|
23 |
global query_engine
|