Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -224,17 +224,19 @@ def predict(user_input, timeout_seconds=1800): # 30 minutes = 1800 seconds
|
|
224 |
# signal.alarm(0) # Cancel the alarm
|
225 |
return "An error occurred during the conversation."
|
226 |
|
227 |
-
while True:
|
228 |
-
|
229 |
#print("Mat:", response)
|
230 |
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
|
|
|
|
|
235 |
|
236 |
-
|
237 |
-
|
238 |
#except Exception as e:
|
239 |
# prediction = str(e)
|
240 |
|
@@ -256,7 +258,7 @@ demo = gr.Interface(
|
|
256 |
concurrency_limit=16
|
257 |
)
|
258 |
|
259 |
-
|
260 |
|
261 |
demo.queue()
|
262 |
demo.launch(share=True)
|
|
|
224 |
# signal.alarm(0) # Cancel the alarm
|
225 |
return "An error occurred during the conversation."
|
226 |
|
227 |
+
#while True:
|
228 |
+
# response = chat_with_bot_timeout(user_input)
|
229 |
#print("Mat:", response)
|
230 |
|
231 |
+
# user_input = input("You: ")
|
232 |
+
# if user_input.lower() in ["quit", "exit"]:
|
233 |
+
# break
|
234 |
|
235 |
+
|
236 |
+
prediction = bot_response.choices[0].message.content.strip()
|
237 |
|
238 |
+
save_feedback(user_input, context_for_query, prediction)
|
239 |
+
|
240 |
#except Exception as e:
|
241 |
# prediction = str(e)
|
242 |
|
|
|
258 |
concurrency_limit=16
|
259 |
)
|
260 |
|
261 |
+
|
262 |
|
263 |
demo.queue()
|
264 |
demo.launch(share=True)
|