Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,24 +8,6 @@ import spaces
|
|
8 |
#----------------------------
|
9 |
import time
|
10 |
import gradio as gr
|
11 |
-
@spaces.GPU
|
12 |
-
def slow_echo(message, history):
|
13 |
-
for i in range(len(message)):
|
14 |
-
ana
|
15 |
-
time.sleep(0.05)
|
16 |
-
|
17 |
-
yield "You typed: " + message[: i + 1]
|
18 |
-
|
19 |
-
demo = gr.ChatInterface(
|
20 |
-
slow_echo,
|
21 |
-
type="messages",
|
22 |
-
flagging_mode="manual",
|
23 |
-
flagging_options=["Like", "Spam", "Inappropriate", "Other"],
|
24 |
-
save_history=True,
|
25 |
-
)
|
26 |
-
|
27 |
-
if __name__ == "__main__":
|
28 |
-
demo.launch(share=True)
|
29 |
|
30 |
#--------------------
|
31 |
|
@@ -106,5 +88,22 @@ demo = gr.ChatInterface(
|
|
106 |
save_history=True,
|
107 |
)
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
if __name__ == "__main__":
|
110 |
demo.launch(share=True)
|
|
|
|
8 |
#----------------------------
|
9 |
import time
|
10 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
#--------------------
|
13 |
|
|
|
88 |
save_history=True,
|
89 |
)
|
90 |
|
91 |
+
@spaces.GPU
|
92 |
+
def slow_echo(message, history):
|
93 |
+
for i in range(len(message)):
|
94 |
+
ana
|
95 |
+
time.sleep(0.05)
|
96 |
+
|
97 |
+
yield "You typed: " + message[: i + 1]
|
98 |
+
|
99 |
+
demo = gr.ChatInterface(
|
100 |
+
slow_echo,
|
101 |
+
type="messages",
|
102 |
+
flagging_mode="manual",
|
103 |
+
flagging_options=["Like", "Spam", "Inappropriate", "Other"],
|
104 |
+
save_history=True,
|
105 |
+
)
|
106 |
+
|
107 |
if __name__ == "__main__":
|
108 |
demo.launch(share=True)
|
109 |
+
|