Spaces:
Running
Running
Leo Fan
commited on
Commit
•
d291d49
1
Parent(s):
96ca499
Restore prompt and LLM.
Browse files- app/server.py +2 -2
app/server.py
CHANGED
@@ -14,7 +14,7 @@ app = FastAPI()
|
|
14 |
# os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'
|
15 |
|
16 |
hf_llm = HuggingFaceHub(
|
17 |
-
repo_id="mistralai/
|
18 |
huggingfacehub_api_token=os.environ["HF_TOKEN"],
|
19 |
task="text-generation",
|
20 |
model_kwargs={"temperature":0.01, "max_new_tokens" : 250}
|
@@ -28,7 +28,7 @@ retriever = faiss_index.as_retriever()
|
|
28 |
# retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
|
29 |
|
30 |
prompt_template = """\
|
31 |
-
Given the context, your task is to answer the user’s question.
|
32 |
|
33 |
Context:
|
34 |
{context}
|
|
|
14 |
# os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/'
|
15 |
|
16 |
hf_llm = HuggingFaceHub(
|
17 |
+
repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
18 |
huggingfacehub_api_token=os.environ["HF_TOKEN"],
|
19 |
task="text-generation",
|
20 |
model_kwargs={"temperature":0.01, "max_new_tokens" : 250}
|
|
|
28 |
# retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
|
29 |
|
30 |
prompt_template = """\
|
31 |
+
Given the context, your task is to answer the user’s question. If the answer is unknown, admit it. If the context doesn’t apply or the question is general, respond as you would in a regular conversation. If the answer is uncertain, try to provide related information that could help the user better understand the topic. Your response should be concise yet comprehensive, limited to 3 sentences. Your primary goal is to assist the user in learning and understanding how to perform a PCR test for COVID-19 more effectively. If you’re unsure about the information, suggest that the user consult their instructor for further clarification.
|
32 |
|
33 |
Context:
|
34 |
{context}
|