saadawaissheikh commited on
Commit
88ca21f
·
verified ·
1 Parent(s): 6b3e781

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -150,17 +150,7 @@ with gr.Blocks(title="Healthcare Chatbot") as app:
150
  img.change(fn=check_tablets, inputs=img, outputs=out)
151
 
152
 
153
- def debug_ocr(img_path):
154
- try:
155
- image = Image.open(img_path)
156
- return pytesseract.image_to_string(image)
157
- except Exception as e:
158
- return f"Error: {str(e)}"
159
 
160
- with gr.Tab("🛠️ Debug OCR"):
161
- img_debug = gr.Image(type="filepath", label="Upload Tablet Receipt for OCR Test")
162
- ocr_output = gr.Textbox(label="OCR Extracted Text")
163
- img_debug.change(fn=debug_ocr, inputs=img_debug, outputs=ocr_output)
164
 
165
  # ✅ Launch App
166
  app.launch()
 
150
  img.change(fn=check_tablets, inputs=img, outputs=out)
151
 
152
 
 
 
 
 
 
 
153
 
 
 
 
 
154
 
155
  # ✅ Launch App
156
  app.launch()