LEWOPO commited on
Commit
2b2bc5a
·
verified ·
1 Parent(s): d2c17a7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline ,Conversation
2
+ import gradio as gr
3
+
4
+ chatbot=pipeline(model="facebook/blenderbot-400M-distill")
5
+ message_list = []
6
+ response_list = []
7
+
8
+ def vanilla_chatbot(message, history):
9
+ conversation = chatbot(message)
10
+
11
+ return conversation[0]['generated_text']
12
+
13
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="POWO Chatbot", description="Entre un texte pour commencer le chatting.")
14
+
15
+ demo_chatbot.launch()