Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
chatbot = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1", trust_remote_code=True) | |
def chat_with_bot(user_input): | |
# Generate a response from the chatbot model | |
response = chatbot(user_input) | |
return response[0]['generated_text'] | |
interface = gr.Interface( | |
fn=chat_with_bot, # Function to call for processing the input | |
inputs=gr.Textbox(label="Enter your message"), # User input (text) | |
outputs=gr.Textbox(label="Chatbot Response"), # Model output (text) | |
title="Chat with DeepSeek", # Optional: Add a title to your interface | |
description="Chat with an AI model powered by DeepSeek!" # Optional: Add a description | |
) | |
interface.launch() |