Sameh891 commited on
Commit
0519d8a
·
verified ·
1 Parent(s): a16ab07

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import torch
3
+ # هنا سيتم استدعاء الكود الذي سحبه الـ Dockerfile من GitHub
4
+ from model import RadFM
5
+
6
+ # دالة المعالجة التي سيتم ربطها بـ Hostinger لاحقاً
7
+ def predict(image):
8
+ # كود معالجة الصورة باستخدام RadFM
9
+ return "جاري تحليل الأشعة... (سيظهر التقرير هنا)"
10
+
11
+ # إنشاء واجهة مستخدم بسيطة
12
+ demo = gr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="text")
13
+
14
+ if __name__ == "__main__":
15
+ demo.launch()