User1342 commited on
Commit
d80b843
·
1 Parent(s): 25b6ec2

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ import gradio as gr
3
+
4
+ def chat(message, history):
5
+ history = history or []
6
+
7
+ history.append((message, "response"))
8
+ return history, history
9
+
10
+ chatbot = gr.Chatbot().style(color_map=("green", "pink"))
11
+ demo = gr.Interface(
12
+ chat,
13
+ ["text", "state"],
14
+ [chatbot, "state"],
15
+ )
16
+ if __name__ == "__main__":
17
+ demo.launch()