File size: 572 Bytes
f06951b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from model import load_model, generate_answer

# تحميل النموذج المدرب من Hugging Face Hub
pipe = load_model()

# وظيفة الرد على المستخدم
def respond(question):
    return generate_answer(pipe, question)

# واجهة Gradio
gr.Interface(
    fn=respond,
    inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا..."),
    outputs="text",
    title="🧠 Veltrix - MGZON Assistant",
    description="مساعد مدرب للإجابة على الأسئلة حول منصة MGZON و OAuth"
).launch()