File size: 277 Bytes
0930044
6b9ca5a
0930044
6b9ca5a
0930044
6b9ca5a
 
0930044
6b9ca5a
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from transformers import pipeline

chatbot = pipeline("conversational", model="microsoft/DialoGPT-medium")

def chat_with_bot(message):
    return chatbot(message)[0]['generated_text']

gr.Interface(fn=chat_with_bot, inputs="text", outputs="text").launch()