Spaces:
Runtime error
Runtime error
gorkemgoknar
commited on
Commit
•
56ad9c6
1
Parent(s):
ef86a55
Update app.py
Browse files
app.py
CHANGED
@@ -235,10 +235,6 @@ def generate_local(
|
|
235 |
formatted_prompt = format_prompt_zephyr(prompt, history,system_message=sys_message)
|
236 |
llm = llm_zephyr
|
237 |
else:
|
238 |
-
sys_message= system_message.replace("##LLM_MODEL###",llm_model).replace("##LLM_MODEL_PROVIDER###",llm_provider)
|
239 |
-
sys_system_understand_message = system_understand_message.replace("##LLM_MODEL###",llm_model).replace("##LLM_MODEL_PROVIDER###",llm_provider)
|
240 |
-
formatted_prompt = format_prompt_mistral(prompt, history,system_message=sys_message,system_understand_message=sys_system_understand_message)
|
241 |
-
|
242 |
if "yi" in llm_model.lower():
|
243 |
llm_provider= "01.ai"
|
244 |
llm_model = "Yi"
|
@@ -247,7 +243,10 @@ def generate_local(
|
|
247 |
llm_provider= "Mistral"
|
248 |
llm_model = "Mistral"
|
249 |
llm = llm_mistral
|
250 |
-
|
|
|
|
|
|
|
251 |
|
252 |
try:
|
253 |
print("LLM Input:", formatted_prompt)
|
|
|
235 |
formatted_prompt = format_prompt_zephyr(prompt, history,system_message=sys_message)
|
236 |
llm = llm_zephyr
|
237 |
else:
|
|
|
|
|
|
|
|
|
238 |
if "yi" in llm_model.lower():
|
239 |
llm_provider= "01.ai"
|
240 |
llm_model = "Yi"
|
|
|
243 |
llm_provider= "Mistral"
|
244 |
llm_model = "Mistral"
|
245 |
llm = llm_mistral
|
246 |
+
sys_message= system_message.replace("##LLM_MODEL###",llm_model).replace("##LLM_MODEL_PROVIDER###",llm_provider)
|
247 |
+
sys_system_understand_message = system_understand_message.replace("##LLM_MODEL###",llm_model).replace("##LLM_MODEL_PROVIDER###",llm_provider)
|
248 |
+
formatted_prompt = format_prompt_mistral(prompt, history,system_message=sys_message,system_understand_message=sys_system_understand_message)
|
249 |
+
|
250 |
|
251 |
try:
|
252 |
print("LLM Input:", formatted_prompt)
|