mafoaurelie commited on
Commit
0a2ff60
1 Parent(s): e03e11e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ chatbot=pipeline(model="facebook/blenderbot-400M-distill")
5
+ def vanilla_chatbot(message, history):
6
+ conversation = chatbot(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()