Sanjayraju30 commited on
Commit
255699e
·
verified ·
1 Parent(s): c43e287

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ def process_image(image):
13
  timestamp = datetime.now(ist).strftime("%Y-%m-%d %H:%M:%S IST")
14
 
15
  if not weight or "No valid" in weight:
16
- return "❌ Unable to detect. Try again with a clearer image.", "", image, gr.update(visible=True)
17
 
18
  return weight, timestamp, image, gr.update(visible=False)
19
  except Exception as e:
@@ -22,7 +22,7 @@ def process_image(image):
22
  with gr.Blocks(css=".gr-button {background-color: #2e7d32 !important; color: white !important;}") as demo:
23
  gr.Markdown("""
24
  <h1 style='text-align: center; color: #2e7d32;'>📷 Auto Weight Logger</h1>
25
- <p style='text-align: center;'>Upload or capture a digital weight image. Detects weight using OCR.</p>
26
  <hr style='border: 1px solid #ddd;'/>
27
  """)
28
 
 
13
  timestamp = datetime.now(ist).strftime("%Y-%m-%d %H:%M:%S IST")
14
 
15
  if not weight or "No valid" in weight:
16
+ return "❌ Unable to detect. Try again with clearer image.", "", image, gr.update(visible=True)
17
 
18
  return weight, timestamp, image, gr.update(visible=False)
19
  except Exception as e:
 
22
  with gr.Blocks(css=".gr-button {background-color: #2e7d32 !important; color: white !important;}") as demo:
23
  gr.Markdown("""
24
  <h1 style='text-align: center; color: #2e7d32;'>📷 Auto Weight Logger</h1>
25
+ <p style='text-align: center;'>Upload or capture a digital weight image. Detects weight using AI OCR (no Tesseract).</p>
26
  <hr style='border: 1px solid #ddd;'/>
27
  """)
28