File size: 434 Bytes
3fd9e1f
f1c5082
3fd9e1f
f1c5082
 
3fd9e1f
f1c5082
 
 
3fd9e1f
f1c5082
 
 
 
3fd9e1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from transformers import pipeline

# Load the model
chatbot = pipeline("text-generation", model="facebook/blenderbot-400M-distill")

def chat_response(message):
    response = chatbot(message, max_length=100, do_sample=True)
    return response[0]['generated_text']

# Create Gradio interface
iface = gr.Interface(fn=chat_response, inputs="text", outputs="text", title="Bit GPT 0.2.8")

# Launch app
iface.launch()