IFMedTechdemo commited on
Commit
b192e3f
·
verified ·
1 Parent(s): 32ef085

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -126,14 +126,14 @@ def run_ocr_and_extract(image, temperature=0.2, extraction_mode="Regex"):
126
  processed_img = image
127
 
128
  # processed_img = preprocess_image_for_ocr(image)
129
- # chat = [
130
- # {
131
- # "role": "user",
132
- # "content": [
133
- # {"type": "image", "image": processed_img}
134
- # ],
135
- # }
136
- # ]
137
  inputs = processor.apply_chat_template(
138
  chat,
139
  add_generation_prompt=True,
 
126
  processed_img = image
127
 
128
  # processed_img = preprocess_image_for_ocr(image)
129
+ chat = [
130
+ {
131
+ "role": "user",
132
+ "content": [
133
+ {"type": "image", "image": processed_img}
134
+ ],
135
+ }
136
+ ]
137
  inputs = processor.apply_chat_template(
138
  chat,
139
  add_generation_prompt=True,