Serv-ai / app.py
kos9's picture
Update app.py
acac886 verified
raw
history blame contribute delete
626 Bytes
import gradio as gr
from transformers import pipeline
# Φόρτωση μοντέλου
chatbot = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3.1")
# Συνάρτηση απάντησης
def respond(message):
response = chatbot(message, max_new_tokens=100)[0]["generated_text"]
return response
# Δικό σου interface
gr.Interface(
fn=respond,
inputs=gr.Textbox(lines=2, placeholder="Γράψε κάτι..."),
outputs="text",
title="Το δικό μου AI Chatbot",
description="Μίλησε με το μοντέλο DeepSeek σε πραγματικό χρόνο!"
).launch()