Sanjayraju30 commited on
Commit
4aec32e
Β·
verified Β·
1 Parent(s): fb27fac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -7,11 +7,9 @@ from ocr_engine import extract_weight
7
  def process_image(image):
8
  if image is None:
9
  return "No image provided", "", None
10
-
11
  try:
12
  weight = extract_weight(image)
13
 
14
- # Get IST time
15
  ist = pytz.timezone('Asia/Kolkata')
16
  now_ist = datetime.now(ist).strftime("%Y-%m-%d %H:%M:%S IST")
17
 
@@ -21,7 +19,7 @@ def process_image(image):
21
 
22
  with gr.Blocks() as demo:
23
  gr.Markdown("## πŸ“· Auto Weight Logger β€” Hugging Face OCR Edition")
24
- gr.Markdown("Upload a digital weight image. Auto-detects value & unit (kg or grams).")
25
 
26
  image_input = gr.Image(type="pil", label="πŸ“ Upload or Capture Image")
27
  detect_btn = gr.Button("πŸš€ Detect Weight")
 
7
  def process_image(image):
8
  if image is None:
9
  return "No image provided", "", None
 
10
  try:
11
  weight = extract_weight(image)
12
 
 
13
  ist = pytz.timezone('Asia/Kolkata')
14
  now_ist = datetime.now(ist).strftime("%Y-%m-%d %H:%M:%S IST")
15
 
 
19
 
20
  with gr.Blocks() as demo:
21
  gr.Markdown("## πŸ“· Auto Weight Logger β€” Hugging Face OCR Edition")
22
+ gr.Markdown("Upload a digital weight image. AI detects numeric value and unit (kg or grams).")
23
 
24
  image_input = gr.Image(type="pil", label="πŸ“ Upload or Capture Image")
25
  detect_btn = gr.Button("πŸš€ Detect Weight")