Spaces:
Running
on
Zero
Running
on
Zero
v1
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
# A100 Zero GPU
|
2 |
import spaces
|
3 |
|
|
|
4 |
import torch
|
5 |
import gradio as gr
|
6 |
from config import *
|
@@ -91,6 +92,7 @@ def bot_streaming(message, history):
|
|
91 |
buffer = ""
|
92 |
for character in response:
|
93 |
buffer += character
|
|
|
94 |
yield buffer
|
95 |
|
96 |
demo = gr.ChatInterface(fn=bot_streaming, title="Meteor",
|
|
|
1 |
# A100 Zero GPU
|
2 |
import spaces
|
3 |
|
4 |
+
import time
|
5 |
import torch
|
6 |
import gradio as gr
|
7 |
from config import *
|
|
|
92 |
buffer = ""
|
93 |
for character in response:
|
94 |
buffer += character
|
95 |
+
time.sleep(0.02)
|
96 |
yield buffer
|
97 |
|
98 |
demo = gr.ChatInterface(fn=bot_streaming, title="Meteor",
|