TekamBrice commited on
Commit
7228328
·
verified ·
1 Parent(s): 50ed546

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import transformers
2
+ from transformers import pipeline
3
+ tqa=pipeline(model="facebook/blenderbot-400M-distill")
4
+ import gradio as gr
5
+ def vanilla_chatbot(message, history):
6
+ conversation = tqa(message)
7
+
8
+ return conversation[0]['generated_text']
9
+
10
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Chatbot", description="Enter text to start chatting.")
11
+
12
+ demo_chatbot.launch()