Sanjayraju30 commited on
Commit
6c9a667
Β·
verified Β·
1 Parent(s): 5b73d24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -12,18 +12,17 @@ def process_image(img):
12
  return f"{weight} g (Confidence: {confidence}%)", ist_time, img
13
 
14
  with gr.Blocks(title="βš–οΈ Auto Weight Logger") as demo:
15
- gr.Markdown("## βš–οΈ Auto Weight Logger\nUpload or capture an image of a digital scale to auto-detect the weight.")
16
 
17
  with gr.Row():
18
  image_input = gr.Image(type="pil", label="πŸ“· Upload or Capture Image")
19
- submit = gr.Button("πŸ” Detect Weight")
20
 
21
  with gr.Row():
22
- output_weight = gr.Textbox(label="βš–οΈ Detected Weight")
23
  timestamp = gr.Textbox(label="πŸ•’ Captured At (IST)")
 
24
 
25
- snapshot = gr.Image(label="πŸ“Έ Snapshot Image")
26
-
27
  submit.click(process_image, inputs=image_input, outputs=[output_weight, timestamp, snapshot])
28
 
29
  demo.launch()
 
12
  return f"{weight} g (Confidence: {confidence}%)", ist_time, img
13
 
14
  with gr.Blocks(title="βš–οΈ Auto Weight Logger") as demo:
15
+ gr.Markdown("## βš–οΈ Auto Weight Logger")
16
 
17
  with gr.Row():
18
  image_input = gr.Image(type="pil", label="πŸ“· Upload or Capture Image")
19
+ output_weight = gr.Textbox(label="βš–οΈ Detected Weight")
20
 
21
  with gr.Row():
 
22
  timestamp = gr.Textbox(label="πŸ•’ Captured At (IST)")
23
+ snapshot = gr.Image(label="πŸ“Έ Snapshot Image")
24
 
25
+ submit = gr.Button("πŸ” Detect Weight")
 
26
  submit.click(process_image, inputs=image_input, outputs=[output_weight, timestamp, snapshot])
27
 
28
  demo.launch()