ashwinaravind commited on
Commit
7d90900
1 Parent(s): abb5d1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,7 +1,9 @@
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 greet(name,history):
4
+ return "Hello " + name + "!!" + history
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ iface.launch()
8
+ iface = gr.ChatInterface(greet, chatbot=gr.Chatbot(height=300), textbox=gr.Textbox(placeholder="Ask me a question", container=False, scale=7), title="IMDB Sentiment Data Analysis Chat", examples = ["Which is most postive review for a movie?", "What is the most reviewed movie?"], theme="soft", cache_examples=False, retry_btn=None, undo_btn="Delete Previous", clear_btn="Clear",)
9
+ iface.launch(share=True)