Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2 |
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
3 |
os.environ["MESA_GL_VERSION_OVERRIDE"] = "4.1"
|
4 |
os.system('pip install /home/user/app/pyrender')
|
|
|
5 |
|
6 |
import gradio as gr
|
7 |
import random
|
@@ -310,10 +311,12 @@ def bot(history, motion_uploaded, data_stored, method):
|
|
310 |
history[-1][1] = ""
|
311 |
for character in response:
|
312 |
history[-1][1] += character
|
313 |
-
|
|
|
|
|
|
|
314 |
yield history, motion_uploaded, data_stored
|
315 |
|
316 |
-
|
317 |
def bot_example(history, responses):
|
318 |
history = history + responses
|
319 |
return history
|
|
|
2 |
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
3 |
os.environ["MESA_GL_VERSION_OVERRIDE"] = "4.1"
|
4 |
os.system('pip install /home/user/app/pyrender')
|
5 |
+
os.system('pip install eventlet')
|
6 |
|
7 |
import gradio as gr
|
8 |
import random
|
|
|
311 |
history[-1][1] = ""
|
312 |
for character in response:
|
313 |
history[-1][1] += character
|
314 |
+
with eventlet.Timeout(0.021,False):
|
315 |
+
time.sleep(0.02)
|
316 |
+
yield history, motion_uploaded, data_stored
|
317 |
+
continue
|
318 |
yield history, motion_uploaded, data_stored
|
319 |
|
|
|
320 |
def bot_example(history, responses):
|
321 |
history = history + responses
|
322 |
return history
|