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