Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ model = model.eval().cuda()
|
|
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":
|
|
|
11 |
@spaces.GPU
|
12 |
def run_GOT(image_array, got_mode, ocr_box="", ocr_color=""):
|
13 |
# image = Image.fromarray(np.uint8(image_array))
|
14 |
+
image = image_array
|
15 |
if got_mode == "plain texts OCR":
|
16 |
res = model.chat(tokenizer, image, ocr_type='ocr', gradio_input=False)
|
17 |
elif got_mode == "format texts OCR":
|