vilarin commited on
Commit
5e79225
·
verified ·
1 Parent(s): 9b39d58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -26,7 +26,7 @@ def terminate():
26
  OLLAMA_SERVICE_THREAD.join()
27
  process = None
28
  OLLAMA_SERVICE_THREAD = None
29
- return "Ollama service stopped."
30
 
31
  # Uncomment and modify the model to what you want locally
32
  # model = "moondream"
@@ -145,7 +145,7 @@ def main(message: str, history: list, model: str, temperature: float, max_new_to
145
  else:
146
  if not process:
147
  launch()
148
- answer = stream_chat(
149
  message,
150
  history,
151
  model,
@@ -155,7 +155,6 @@ def main(message: str, history: list, model: str, temperature: float, max_new_to
155
  top_k,
156
  penalty
157
  )
158
- yield answer
159
 
160
 
161
  chatbot = gr.Chatbot(height=600, placeholder=DESCRIPTION)
 
26
  OLLAMA_SERVICE_THREAD.join()
27
  process = None
28
  OLLAMA_SERVICE_THREAD = None
29
+ print("Ollama service stopped.")
30
 
31
  # Uncomment and modify the model to what you want locally
32
  # model = "moondream"
 
145
  else:
146
  if not process:
147
  launch()
148
+ stream_chat(
149
  message,
150
  history,
151
  model,
 
155
  top_k,
156
  penalty
157
  )
 
158
 
159
 
160
  chatbot = gr.Chatbot(height=600, placeholder=DESCRIPTION)