Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from utils import get_md_text_abstract, search_cleaner, get_arxiv_live_search
|
|
13 |
|
14 |
retrieve_results = 20
|
15 |
show_examples = True
|
16 |
-
llm_models_to_choose = ['
|
17 |
|
18 |
token=os.getenv("HF_TOKEN")
|
19 |
|
@@ -69,15 +69,9 @@ if len(check_arxiv_result) == 0:
|
|
69 |
sample_outputs = {
|
70 |
'output_placeholder': 'The LLM will provide an answer to your question here...',
|
71 |
'search_placeholder': '''
|
72 |
-
1.
|
73 |
-
2.
|
74 |
-
3.
|
75 |
-
4. What is Semantic and Episodic memory?
|
76 |
-
5. What is AutoGen?
|
77 |
-
6. What is ChatDev?
|
78 |
-
7. What is Omniverse?
|
79 |
-
8. What is Lumiere?
|
80 |
-
9. What is SORA?
|
81 |
'''
|
82 |
}
|
83 |
|
@@ -94,7 +88,7 @@ def rag_cleaner(inp):
|
|
94 |
|
95 |
def get_prompt_text(question, context, formatted = True, llm_model_picked = 'mistralai/Mixtral-8x7B-Instruct-v0.1'):
|
96 |
if formatted:
|
97 |
-
sys_instruction = f"Context:\n {context} \n ๋ฐ๋์ ํ๊ธ๋ก ๋ต๋ณํ๋ผ. Given the following scientific paper abstracts, take a deep breath and lets think step by step to answer the question. Cite the titles of your sources when answering, do not cite links or dates."
|
98 |
message = f"Question: {question}"
|
99 |
|
100 |
if 'mistralai' in llm_model_picked:
|
|
|
13 |
|
14 |
retrieve_results = 20
|
15 |
show_examples = True
|
16 |
+
llm_models_to_choose = ['mistralai/Mixtral-8x7B-Instruct-v0.1', 'None']
|
17 |
|
18 |
token=os.getenv("HF_TOKEN")
|
19 |
|
|
|
69 |
sample_outputs = {
|
70 |
'output_placeholder': 'The LLM will provide an answer to your question here...',
|
71 |
'search_placeholder': '''
|
72 |
+
1. Sora์ ๋ํ ๋
ผ๋ฌธ๋ค ์์ฝํด์ค
|
73 |
+
2. RAG ๊ตฌ์ฑ ๊ด๋ จ ๋
ผ๋ฌธ๋ค ๋ถ์ํด์ค
|
74 |
+
3. Vision ์ธ์์ ๋ํ ์ต์ ๊ฒฝํฅ ๋ถ์ํด์ค
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
'''
|
76 |
}
|
77 |
|
|
|
88 |
|
89 |
def get_prompt_text(question, context, formatted = True, llm_model_picked = 'mistralai/Mixtral-8x7B-Instruct-v0.1'):
|
90 |
if formatted:
|
91 |
+
sys_instruction = f"Context:\n {context} \n ๋ฐ๋์ ํ๊ธ๋ก ๋ต๋ณํ๋ผ. Given the following scientific paper abstracts, take a deep breath and lets think step by step to answer the question. Cite the titles of your sources when answering, do not cite links or dates. ์ถ๋ ฅ์ ๋ฐ๋์ ํ๊ตญ์ด(ํ๊ธ)๋ก ํ๋ผ."
|
92 |
message = f"Question: {question}"
|
93 |
|
94 |
if 'mistralai' in llm_model_picked:
|