Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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()
|