Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
import modal
|
|
|
3 |
|
4 |
-
f = modal.Function.lookup("tutor_mixtral_1000", "Model.generate")
|
5 |
user_input = ""
|
6 |
history = ""
|
7 |
|
8 |
def echo(message, history):
|
9 |
message = "Human: "+message+"\nAssistant: "
|
10 |
answer = ""
|
11 |
-
for t in
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import modal
|
3 |
+
import time
|
4 |
|
5 |
+
#f = modal.Function.lookup("tutor_mixtral_1000", "Model.generate")
|
6 |
user_input = ""
|
7 |
history = ""
|
8 |
|
9 |
def echo(message, history):
|
10 |
message = "Human: "+message+"\nAssistant: "
|
11 |
answer = ""
|
12 |
+
for t in "Hallo Welt":
|
13 |
+
time.sleep(1)
|
14 |
+
yield t
|
15 |
|
16 |
+
gr.ChatInterface(fn=echo, title="Tutor Bot").queue()
|
|