Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
### ROUND 1 ###
|
2 |
-
import gradio as gr
|
3 |
|
4 |
-
def echo(message, history):
|
5 |
-
|
6 |
|
7 |
-
demo = gr.ChatInterface(fn=echo, type="messages", examples=["hello", "hola", "merhaba"], title="Echo Bot")
|
8 |
-
demo.launch()
|
9 |
|
10 |
## ROUND 2 ###
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
|
22 |
|
23 |
### ROUND 3 ###
|
|
|
1 |
### ROUND 1 ###
|
2 |
+
# import gradio as gr
|
3 |
|
4 |
+
# def echo(message, history):
|
5 |
+
# return message
|
6 |
|
7 |
+
# demo = gr.ChatInterface(fn=echo, type="messages", examples=["hello", "hola", "merhaba"], title="Echo Bot")
|
8 |
+
# demo.launch()
|
9 |
|
10 |
## ROUND 2 ###
|
11 |
+
import random
|
12 |
+
import gradio as gr
|
13 |
|
14 |
+
def random_response(message, history):
|
15 |
+
return random.choice(["Yes", "No"])
|
16 |
|
17 |
+
demo = gr.ChatInterface(random_response, type="messages", autofocus=True)
|
18 |
|
19 |
+
if __name__ == "__main__":
|
20 |
+
demo.launch()
|
21 |
|
22 |
|
23 |
### ROUND 3 ###
|