ZamiSanj commited on
Commit
5d27f21
1 Parent(s): 30f266c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
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()