Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -210,7 +210,7 @@ prompt = PromptTemplate.from_template(
|
|
| 210 |
|
| 211 |
# ✅ Invoke Hugging Face Model
|
| 212 |
hf = get_llm_hf_inference(max_new_tokens=max_new_tokens, temperature=0.3) # 🔥 Lowered temperature
|
| 213 |
-
|
| 214 |
|
| 215 |
response = chat.invoke(input=dict(system_message=system_message, user_text=user_text, chat_history=filtered_history))
|
| 216 |
response = response.split("HAL:")[-1].strip() if "HAL:" in response else response.strip()
|
|
|
|
| 210 |
|
| 211 |
# ✅ Invoke Hugging Face Model
|
| 212 |
hf = get_llm_hf_inference(max_new_tokens=max_new_tokens, temperature=0.3) # 🔥 Lowered temperature
|
| 213 |
+
chat = prompt | hf.bind(skip_prompt=True) | StrOutputParser(output_key='content')
|
| 214 |
|
| 215 |
response = chat.invoke(input=dict(system_message=system_message, user_text=user_text, chat_history=filtered_history))
|
| 216 |
response = response.split("HAL:")[-1].strip() if "HAL:" in response else response.strip()
|