ucaslcl commited on
Commit
b1259cb
Β·
verified Β·
1 Parent(s): 7d3d794

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ model = AutoModel.from_pretrained('ucaslcl/GOT-OCR2_0', trust_remote_code=True,
9
  model = model.eval().cuda()
10
 
11
  @spaces.GPU
12
- def run_GOT(image_array, got_mode, ocr_box="", ocr_color=""):
13
  image = image_array
14
  if got_mode == "plain texts OCR":
15
  res = model.chat(tokenizer, image, ocr_type='ocr')
@@ -135,7 +135,7 @@ with gr.Blocks() as demo:
135
 
136
  submit_button.click(
137
  run_GOT,
138
- inputs=[image_input, task_dropdown, box_input, color_dropdown],
139
  outputs=[ocr_result, html_result]
140
  )
141
 
 
9
  model = model.eval().cuda()
10
 
11
  @spaces.GPU
12
+ def run_GOT(image_array, got_mode, fine_grained_mode="", ocr_color="", ocr_box=""):
13
  image = image_array
14
  if got_mode == "plain texts OCR":
15
  res = model.chat(tokenizer, image, ocr_type='ocr')
 
135
 
136
  submit_button.click(
137
  run_GOT,
138
+ inputs=[image_input, task_dropdown, fine_grained_dropdown, color_dropdown, box_input],
139
  outputs=[ocr_result, html_result]
140
  )
141