Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
import random
|
|
|
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
return random.choice(["Yes", "No"])
|
|
|
|
|
|
|
| 1 |
import random
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
+
def alternatingly_agree(message, history):
|
| 5 |
+
if len(history) % 2 == 0:
|
| 6 |
+
return f"Yes, I do think that '{message}'"
|
| 7 |
+
else:
|
| 8 |
+
return "I don't think so"
|
| 9 |
|
| 10 |
+
gr.ChatInterface(alternatingly_agree).launch()
|
|
|