Sanjayraju30 commited on
Commit
2bbc794
Β·
verified Β·
1 Parent(s): b3cf707

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 clearer image.", "", image, gr.update(visible=True)
17
 
18
  return weight, timestamp, image, gr.update(visible=False)
19
  except Exception as e:
@@ -33,7 +33,7 @@ with gr.Blocks(css=".gr-button {background-color: #2e7d32 !important; color: whi
33
 
34
  with gr.Row():
35
  weight_out = gr.Textbox(label="πŸ“¦ Detected Weight", placeholder="e.g., 97.9 kg", show_copy_button=True)
36
- time_out = gr.Textbox(label="πŸ•’ Captured At (IST)", placeholder="e.g., 2025-06-30 14:32:10")
37
 
38
  snapshot = gr.Image(label="πŸ“Έ Snapshot Preview")
39
  retake_btn = gr.Button("πŸ” Retake / Try Again", visible=False)
 
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:
 
33
 
34
  with gr.Row():
35
  weight_out = gr.Textbox(label="πŸ“¦ Detected Weight", placeholder="e.g., 97.9 kg", show_copy_button=True)
36
+ time_out = gr.Textbox(label="πŸ•’ Captured At (IST)", placeholder="e.g., 2025-07-01 12:00:00")
37
 
38
  snapshot = gr.Image(label="πŸ“Έ Snapshot Preview")
39
  retake_btn = gr.Button("πŸ” Retake / Try Again", visible=False)