ucaslcl commited on
Commit
0554db6
·
verified ·
1 Parent(s): 7eb334c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,9 +10,9 @@ model = model.eval().cuda()
10
 
11
  @spaces.GPU
12
  def run_GOT(image_array, got_mode, ocr_box="", ocr_color=""):
13
- image = Image.fromarray(np.uint8(image_array))
14
  if got_mode == "plain texts OCR":
15
- res = model.chat(tokenizer, image, ocr_type='ocr', gradio_input=True)
16
  elif got_mode == "format texts OCR":
17
  res = model.chat(tokenizer, image, ocr_type='format', render=True, save_render_file='./demo.html', gradio_input=True)
18
  elif got_mode == "plain multi-crop OCR":
 
10
 
11
  @spaces.GPU
12
  def run_GOT(image_array, got_mode, ocr_box="", ocr_color=""):
13
+ # image = Image.fromarray(np.uint8(image_array))
14
  if got_mode == "plain texts OCR":
15
+ res = model.chat(tokenizer, image, ocr_type='ocr', gradio_input=False)
16
  elif got_mode == "format texts OCR":
17
  res = model.chat(tokenizer, image, ocr_type='format', render=True, save_render_file='./demo.html', gradio_input=True)
18
  elif got_mode == "plain multi-crop OCR":