deepseek-r1 / app.py
krishna-k's picture
Update app.py
3dad239 verified
raw
history blame
733 Bytes
from transformers import pipeline
import gradio as gr
chatbot = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
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()