Spaces:
Build error
Build error
updated model paths to MSFT org.
Browse files
app.py
CHANGED
|
@@ -140,7 +140,7 @@ def table_detector(image, THRESHOLD_PROBA):
|
|
| 140 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=800, max_size=800)
|
| 141 |
encoding = feature_extractor(image, return_tensors="pt")
|
| 142 |
|
| 143 |
-
model = DetrForObjectDetection.from_pretrained("
|
| 144 |
|
| 145 |
with torch.no_grad():
|
| 146 |
outputs = model(**encoding)
|
|
@@ -163,7 +163,7 @@ def table_struct_recog(image, THRESHOLD_PROBA):
|
|
| 163 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=1000, max_size=1000)
|
| 164 |
encoding = feature_extractor(image, return_tensors="pt")
|
| 165 |
|
| 166 |
-
model = DetrForObjectDetection.from_pretrained("
|
| 167 |
with torch.no_grad():
|
| 168 |
outputs = model(**encoding)
|
| 169 |
|
|
|
|
| 140 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=800, max_size=800)
|
| 141 |
encoding = feature_extractor(image, return_tensors="pt")
|
| 142 |
|
| 143 |
+
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-detection")
|
| 144 |
|
| 145 |
with torch.no_grad():
|
| 146 |
outputs = model(**encoding)
|
|
|
|
| 163 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=1000, max_size=1000)
|
| 164 |
encoding = feature_extractor(image, return_tensors="pt")
|
| 165 |
|
| 166 |
+
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-structure-recognition")
|
| 167 |
with torch.no_grad():
|
| 168 |
outputs = model(**encoding)
|
| 169 |
|