Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import cv2
|
|
| 4 |
import pytesseract
|
| 5 |
import numpy as np
|
| 6 |
from PIL import Image
|
| 7 |
-
from transformers import DetrImageProcessor, TableTransformerForObjectDetection
|
| 8 |
|
| 9 |
# ===============================
|
| 10 |
# Chargement des modèles
|
|
@@ -23,7 +23,7 @@ det_model = TableTransformerForObjectDetection.from_pretrained(
|
|
| 23 |
struct_processor = DetrImageProcessor.from_pretrained(
|
| 24 |
"microsoft/table-transformer-structure-recognition"
|
| 25 |
)
|
| 26 |
-
struct_model =
|
| 27 |
"microsoft/table-transformer-structure-recognition"
|
| 28 |
).to(DEVICE)
|
| 29 |
|
|
|
|
| 4 |
import pytesseract
|
| 5 |
import numpy as np
|
| 6 |
from PIL import Image
|
| 7 |
+
from transformers import DetrImageProcessor, TableTransformerForObjectDetection
|
| 8 |
|
| 9 |
# ===============================
|
| 10 |
# Chargement des modèles
|
|
|
|
| 23 |
struct_processor = DetrImageProcessor.from_pretrained(
|
| 24 |
"microsoft/table-transformer-structure-recognition"
|
| 25 |
)
|
| 26 |
+
struct_model = TableTransformerForObjectDetection.from_pretrained(
|
| 27 |
"microsoft/table-transformer-structure-recognition"
|
| 28 |
).to(DEVICE)
|
| 29 |
|