Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -347,10 +347,18 @@ def generate(text, history, rag_option, model_option, k=3, top_p=0.6, temperatu
|
|
| 347 |
#return chatbot_message
|
| 348 |
|
| 349 |
#Antwort als Stream ausgeben...
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
|
|
|
|
| 354 |
#Antwort als Stream ausgeben...
|
| 355 |
history[-1][1] = ""
|
| 356 |
for character in chatbot_message:
|
|
@@ -364,7 +372,7 @@ def generate(text, history, rag_option, model_option, k=3, top_p=0.6, temperatu
|
|
| 364 |
return
|
| 365 |
except:
|
| 366 |
pass
|
| 367 |
-
|
| 368 |
|
| 369 |
#zum Evaluieren:
|
| 370 |
# custom eli5 criteria
|
|
|
|
| 347 |
#return chatbot_message
|
| 348 |
|
| 349 |
#Antwort als Stream ausgeben...
|
| 350 |
+
for i in range(len(chatbot_message)):
|
| 351 |
+
time.sleep(0.03)
|
| 352 |
+
yield chatbot_message[: i+1], "Generating"
|
| 353 |
+
if shared_state.interrupted:
|
| 354 |
+
shared_state.recover()
|
| 355 |
+
try:
|
| 356 |
+
yield chatbot_message[: i+1], "Stop: Success"
|
| 357 |
+
return
|
| 358 |
+
except:
|
| 359 |
+
pass
|
| 360 |
|
| 361 |
+
"""
|
| 362 |
#Antwort als Stream ausgeben...
|
| 363 |
history[-1][1] = ""
|
| 364 |
for character in chatbot_message:
|
|
|
|
| 372 |
return
|
| 373 |
except:
|
| 374 |
pass
|
| 375 |
+
"""
|
| 376 |
|
| 377 |
#zum Evaluieren:
|
| 378 |
# custom eli5 criteria
|