aiwebhook commited on
Commit
0c02bbc
·
1 Parent(s): f447aad

Deploy full app with model and examples

Browse files
Files changed (2) hide show
  1. .gitattributes +2 -0
  2. app.py +7 -2
.gitattributes CHANGED
@@ -34,3 +34,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.keras filter=lfs diff=lfs merge=lfs -text
 
 
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.keras filter=lfs diff=lfs merge=lfs -text
37
+ *.jpg filter=lfs diff=lfs merge=lfs -text
38
+ *.png filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import os
3
  import numpy as np
@@ -39,13 +40,17 @@ def predict(image):
39
  }
40
  return confidences
41
 
42
- # --- 4. إنشاء الواجهة ---
43
  demo = gr.Interface(
44
  fn=predict,
45
  inputs=gr.Image(label="Upload Kidney CT Image", type="pil"),
46
  outputs=gr.Label(num_top_classes=2, label="Prediction Results"),
47
  title="🩺 Kidney Tumor Detection",
48
- description="AI model to detect tumors in kidney CT scans. (Proof of concept for a university project)"
 
 
 
 
49
  )
50
 
51
  # --- 5. تشغيل التطبيق ---
 
1
+
2
  import gradio as gr
3
  import os
4
  import numpy as np
 
40
  }
41
  return confidences
42
 
43
+ # --- 4. إنشاء الواجهة (مع إضافة الأمثلة) ---
44
  demo = gr.Interface(
45
  fn=predict,
46
  inputs=gr.Image(label="Upload Kidney CT Image", type="pil"),
47
  outputs=gr.Label(num_top_classes=2, label="Prediction Results"),
48
  title="🩺 Kidney Tumor Detection",
49
+ description="An AI model to detect tumors in kidney CT scans, built with ResNet50V2. (Proof of concept for a university project).",
50
+ examples=[
51
+ "example_normal1.jpg", "example_normal2.jpg", "example_normal3.jpg", "example_normal4.jpg",
52
+ "example_tumor1.jpg", "example_tumor2.jpg", "example_tumor3.jpg", "example_tumor4.jpg", "example_tumor5.jpg"
53
+ ]
54
  )
55
 
56
  # --- 5. تشغيل التطبيق ---