Sanjayraju30 commited on
Commit
2d8883b
Β·
verified Β·
1 Parent(s): da9f292

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,6 @@ from datetime import datetime
3
  import pytz
4
  from ocr_engine import extract_weight_from_image
5
 
6
- # NEW: Add debug list to see OCR text
7
  def process_image(img):
8
  if img is None:
9
  return "No image uploaded", None, None, "No OCR output"
@@ -24,7 +23,8 @@ with gr.Blocks(title="βš–οΈ Auto Weight Logger") as demo:
24
  timestamp = gr.Textbox(label="πŸ•’ Captured At (IST)")
25
  snapshot = gr.Image(label="πŸ“Έ Snapshot Image")
26
 
27
- debug_output = gr.Textbox(label="πŸͺ΅ Raw OCR Output")
 
28
 
29
  submit = gr.Button("πŸ” Detect Weight")
30
  submit.click(process_image, inputs=image_input, outputs=[output_weight, timestamp, snapshot, debug_output])
 
3
  import pytz
4
  from ocr_engine import extract_weight_from_image
5
 
 
6
  def process_image(img):
7
  if img is None:
8
  return "No image uploaded", None, None, "No OCR output"
 
23
  timestamp = gr.Textbox(label="πŸ•’ Captured At (IST)")
24
  snapshot = gr.Image(label="πŸ“Έ Snapshot Image")
25
 
26
+ with gr.Row():
27
+ debug_output = gr.Textbox(label="πŸͺ΅ Raw OCR Output")
28
 
29
  submit = gr.Button("πŸ” Detect Weight")
30
  submit.click(process_image, inputs=image_input, outputs=[output_weight, timestamp, snapshot, debug_output])