Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def alternatingly_agree(message, history):
|
4 |
+
if len(history) % 2 == 0:
|
5 |
+
return f"Yes, I do think that '{message}'"
|
6 |
+
else:
|
7 |
+
return "I don't think so"
|
8 |
+
|
9 |
+
gr.ChatInterface(alternatingly_agree).launch()
|
10 |
|
11 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
12 |
iface.launch()
|