trapezius60 commited on
Commit
c295347
·
verified ·
1 Parent(s): d2d1936

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -62,7 +62,6 @@ def classify_mushroom(image: Image.Image):
62
  # 🔗 Open user manual (link version) 🆕
63
  MANUAL_URL = "https://drive.google.com/drive/folders/19lUCEaLstrRjCzqpDlWErhRd1EXWUGbf?usp=sharing"
64
  manual_link = f"<a href=\"{MANUAL_URL}\" target=\"_blank\">📄 Open User Manual</a>"
65
-
66
  # 🎛️ Gradio UI
67
  if __name__ == "__main__":
68
  with gr.Blocks() as demo:
@@ -70,7 +69,8 @@ if __name__ == "__main__":
70
  gr.Markdown("Upload a mushroom photo or use your camera to check if it’s edible or poisonous.\nอัปโหลดรูปเห็ดหรือใช้กล้องเพื่อตรวจสอบว่าเห็ดกินได้หรือมีพิษ")
71
 
72
  with gr.Row():
73
- image_input = gr.Image(type="pil", label="📷 Upload or Capture Mushroom Image")
 
74
  label_en = gr.Textbox(label="🧬 Prediction (English)")
75
  label_th = gr.Textbox(label="🔁 คำทำนาย (ภาษาไทย)")
76
  confidence = gr.Textbox(label="📶 Confidence Score")
 
62
  # 🔗 Open user manual (link version) 🆕
63
  MANUAL_URL = "https://drive.google.com/drive/folders/19lUCEaLstrRjCzqpDlWErhRd1EXWUGbf?usp=sharing"
64
  manual_link = f"<a href=\"{MANUAL_URL}\" target=\"_blank\">📄 Open User Manual</a>"
 
65
  # 🎛️ Gradio UI
66
  if __name__ == "__main__":
67
  with gr.Blocks() as demo:
 
69
  gr.Markdown("Upload a mushroom photo or use your camera to check if it’s edible or poisonous.\nอัปโหลดรูปเห็ดหรือใช้กล้องเพื่อตรวจสอบว่าเห็ดกินได้หรือมีพิษ")
70
 
71
  with gr.Row():
72
+ image_input = gr.Image(type="pil", label="📷 Upload or Capture Mushroom Image") # 🆕 safer source usage
73
+ with gr.Column():
74
  label_en = gr.Textbox(label="🧬 Prediction (English)")
75
  label_th = gr.Textbox(label="🔁 คำทำนาย (ภาษาไทย)")
76
  confidence = gr.Textbox(label="📶 Confidence Score")