MGZON commited on
Commit
f06951b
·
verified ·
1 Parent(s): 16b0c06

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from model import load_model, generate_answer
3
+
4
+ # تحميل النموذج المدرب من Hugging Face Hub
5
+ pipe = load_model()
6
+
7
+ # وظيفة الرد على المستخدم
8
+ def respond(question):
9
+ return generate_answer(pipe, question)
10
+
11
+ # واجهة Gradio
12
+ gr.Interface(
13
+ fn=respond,
14
+ inputs=gr.Textbox(lines=3, placeholder="اكتب سؤالك هنا..."),
15
+ outputs="text",
16
+ title="🧠 Veltrix - MGZON Assistant",
17
+ description="مساعد مدرب للإجابة على الأسئلة حول منصة MGZON و OAuth"
18
+ ).launch()