Spaces:
Sleeping
Sleeping
ashwinaravind
commited on
Commit
•
c4e21d2
1
Parent(s):
5f413ac
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def greet(name,history):
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
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",)
|
7 |
iface.launch(share=True)
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def greet(name,history):
|
4 |
+
hist_msg=""
|
5 |
+
for h in history
|
6 |
+
hist_msg = hist_msg + h
|
7 |
+
return "Hello " + name + "!!" + hist_msg
|
8 |
|
9 |
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",)
|
10 |
iface.launch(share=True)
|