File size: 626 Bytes
d37cd3d
acac886
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()