File size: 292 Bytes
54fe56c e25dd63 54fe56c d96fc2f 54fe56c e25dd63 d96fc2f e25dd63 54fe56c e25dd63 | 1 2 3 4 5 6 7 8 9 10 | 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() |