caaxgave commited on
Commit
2c8adcc
1 Parent(s): 82f9b3d
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1,7 +1,17 @@
 
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
+ from transformers import pipeline, Conversation
2
  import gradio as gr
3
 
4
+ # defining model
5
+ chatbot = pipeline(model="facebook/blenderbot-400M-distill")
6
 
7
+ message_list = []
8
+ response_list = []
9
+
10
+
11
+ def vanilla_chatbot(user_message, history):
12
+ conversation = chatbot(user_message)
13
+ return conversation[0]["generated_text"]
14
+
15
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Vanilla Chatbot", description="Enter text to start chatting.")
16
+
17
+ demo_chatbot.launch()