Spaces:
Running
Running
initial commit
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ model.config.pad_token_id = tokenizer.eos_token_id
|
|
| 13 |
|
| 14 |
@spaces.GPU
|
| 15 |
def process_image(image, task, ocr_type=None, ocr_box=None, ocr_color=None, render=False):
|
| 16 |
-
|
| 17 |
attention_mask = torch.ones((1, model.config.max_position_embeddings), dtype=torch.long, device=model.device)
|
| 18 |
|
| 19 |
if task == "Plain Text OCR":
|
|
|
|
| 13 |
|
| 14 |
@spaces.GPU
|
| 15 |
def process_image(image, task, ocr_type=None, ocr_box=None, ocr_color=None, render=False):
|
| 16 |
+
|
| 17 |
attention_mask = torch.ones((1, model.config.max_position_embeddings), dtype=torch.long, device=model.device)
|
| 18 |
|
| 19 |
if task == "Plain Text OCR":
|