CCockrum commited on
Commit
4f593e2
·
verified ·
1 Parent(s): 57f589e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -116,7 +116,7 @@ def get_response(system_message, chat_history, user_text, max_new_tokens=512):
116
 
117
  # ✅ Invoke LLM Model
118
  chat = prompt | hf.bind(skip_prompt=True) | StrOutputParser(output_key='content')
119
- response = chat.invoke(input=dict(system_message=system_message, user_text=user_text, chat_history=filtered_history))
120
  response = response.split("HAL:")[-1].strip()
121
 
122
  # ✅ Ensure English
 
116
 
117
  # ✅ Invoke LLM Model
118
  chat = prompt | hf.bind(skip_prompt=True) | StrOutputParser(output_key='content')
119
+ response = response.split("HAL:")[-1].strip() if "HAL:" in response else response.strip()
120
  response = response.split("HAL:")[-1].strip()
121
 
122
  # ✅ Ensure English