Spaces:
Runtime error
Runtime error
Commit
·
2faf40a
1
Parent(s):
748f54e
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,12 +29,11 @@ llm = HuggingFaceHub(repo_id=llama2_repo_id, #for Llama2
|
|
| 29 |
"temperature":0.1,
|
| 30 |
"top_k":50,
|
| 31 |
"top_p":0.95, "eos_token_id":49155})
|
| 32 |
-
#似乎是因为iShare不是HF的Pro账户,所以会遇到Runtime error: Scheduling failure: not enough hardware capacity(设置为llama2_repo_id时)???
|
| 33 |
|
| 34 |
prompt_template = """
|
| 35 |
-
You are a helpful, respectful and honest assistant.
|
| 36 |
-
|
| 37 |
-
|
| 38 |
"""
|
| 39 |
|
| 40 |
llm_chain = LLMChain(llm=llm, prompt=PromptTemplate.from_template(prompt_template))
|
|
|
|
| 29 |
"temperature":0.1,
|
| 30 |
"top_k":50,
|
| 31 |
"top_p":0.95, "eos_token_id":49155})
|
|
|
|
| 32 |
|
| 33 |
prompt_template = """
|
| 34 |
+
<<SYS>>You are a helpful, respectful and honest assistant. If you don't know the answer to a question, please don't share false information.In each conversation, question is placed after [INST] while your answer should be placed after [/INST].<</SYS>>
|
| 35 |
+
[INST] {user_question} [/INST]
|
| 36 |
+
assistant:
|
| 37 |
"""
|
| 38 |
|
| 39 |
llm_chain = LLMChain(llm=llm, prompt=PromptTemplate.from_template(prompt_template))
|