ammariii08 commited on
Commit
3a08c60
·
verified ·
1 Parent(s): 2c26fe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -105,7 +105,6 @@ def process_image(input_image):
105
  output = ocr_model.generate(
106
  **inputs,
107
  max_new_tokens=40,
108
- temperature=0.2,
109
  num_beams=1,
110
  do_sample=False # Greedy decoding
111
  )
@@ -138,11 +137,9 @@ iface = gr.Interface(
138
  gr.Image(type="pil", label="Cropped & Preprocessed Image"),
139
  gr.Textbox(label="Extracted Text")
140
  ],
141
- title="Document OCR with YOLO (Ultralytics) and OLMOCR",
142
  description=(
143
- "Upload an image of a document. The app enhances the image, uses a YOLO model "
144
- "to detect and crop the document (front/back) with a confidence threshold of 0.85, and "
145
- "then extracts text using an OCR model with a corresponding prompt."
146
  ),
147
  allow_flagging="never" # Disable flagging to simplify UI
148
  )
 
105
  output = ocr_model.generate(
106
  **inputs,
107
  max_new_tokens=40,
 
108
  num_beams=1,
109
  do_sample=False # Greedy decoding
110
  )
 
137
  gr.Image(type="pil", label="Cropped & Preprocessed Image"),
138
  gr.Textbox(label="Extracted Text")
139
  ],
140
+ title="Document OCR with YOLO and OLMOCR",
141
  description=(
142
+ "Upload an image of a document. The app enhances the image, then extracts text using an OCR model."
 
 
143
  ),
144
  allow_flagging="never" # Disable flagging to simplify UI
145
  )