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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  ###################################### version 4 NER change done #######################################################
2
 
3
 
@@ -121,15 +123,17 @@ def run_ocr_and_extract(image, temperature=0.2, extraction_mode="Regex"):
121
  trust_remote_code=True,
122
  )
123
 
124
- processed_img = preprocess_image_for_ocr(image)
125
- chat = [
126
- {
127
- "role": "user",
128
- "content": [
129
- {"type": "image", "image": processed_img}
130
- ],
131
- }
132
- ]
 
 
133
  inputs = processor.apply_chat_template(
134
  chat,
135
  add_generation_prompt=True,
 
1
+
2
+
3
  ###################################### version 4 NER change done #######################################################
4
 
5
 
 
123
  trust_remote_code=True,
124
  )
125
 
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,