AI_Model / app.py
Json026's picture
Update app.py
d96fc2f verified
raw
history blame contribute delete
292 Bytes
import gradio as gr
from transformers import pipeline
chatbot = pipeline("text-generation", model="microsoft/DialoGPT-small")
def respond(message):
return chatbot(message, max_length=100)[0]["generated_text"]
demo = gr.Interface(fn=respond, inputs="text", outputs="text")
demo.launch()