pavansuresh commited on
Commit
098c355
·
verified ·
1 Parent(s): 1623ecc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -83,9 +83,10 @@ def process_image(input_img, brightness_threshold=150):
83
 
84
  annotated_img_rgb = cv2.cvtColor(annotated_img, cv2.COLOR_BGR2RGB)
85
 
86
- report_text = f"UV Sterilization Coverage: {coverage_percent:.2f}%\n\nExtracted Texts:\n"
87
- report_text += "\n".join(extracted_texts) if extracted_texts else "No text detected."
88
- report_text += f"\n\nOCR Processing Time: {ocr_time:.2f} seconds"
 
89
 
90
  os.unlink(temp_img_file.name)
91
 
@@ -99,7 +100,7 @@ iface = gr.Interface(
99
  ],
100
  outputs=[
101
  gr.Image(type="numpy", label="Annotated Image"),
102
- gr.Textbox(label="UV Sterilization Report", lines=10),
103
  gr.File(label="Download PDF Report")
104
  ],
105
  title="UV Sterilization Coverage Analyzer",
 
83
 
84
  annotated_img_rgb = cv2.cvtColor(annotated_img, cv2.COLOR_BGR2RGB)
85
 
86
+ # Hide extracted texts in output; show only coverage percentage
87
+ report_text = f"UV Sterilization Coverage: {coverage_percent:.2f}%"
88
+ # Optionally include OCR processing time
89
+ # report_text += f"\n\nOCR Processing Time: {ocr_time:.2f} seconds"
90
 
91
  os.unlink(temp_img_file.name)
92
 
 
100
  ],
101
  outputs=[
102
  gr.Image(type="numpy", label="Annotated Image"),
103
+ gr.Textbox(label="UV Sterilization Report", lines=5),
104
  gr.File(label="Download PDF Report")
105
  ],
106
  title="UV Sterilization Coverage Analyzer",