Spaces:
Build error
Build error
debu das
commited on
Commit
•
c169a19
1
Parent(s):
400d111
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def table_detector(image, THRESHOLD_PROBA):
|
|
142 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=800, max_size=800)
|
143 |
encoding = feature_extractor(image, return_tensors="pt")
|
144 |
|
145 |
-
model = DetrForObjectDetection.from_pretrained("
|
146 |
|
147 |
with torch.no_grad():
|
148 |
outputs = model(**encoding)
|
@@ -165,7 +165,7 @@ def table_struct_recog(image, THRESHOLD_PROBA):
|
|
165 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=1000, max_size=1000)
|
166 |
encoding = feature_extractor(image, return_tensors="pt")
|
167 |
|
168 |
-
model = DetrForObjectDetection.from_pretrained("
|
169 |
with torch.no_grad():
|
170 |
outputs = model(**encoding)
|
171 |
|
|
|
142 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=800, max_size=800)
|
143 |
encoding = feature_extractor(image, return_tensors="pt")
|
144 |
|
145 |
+
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-detection")
|
146 |
|
147 |
with torch.no_grad():
|
148 |
outputs = model(**encoding)
|
|
|
165 |
feature_extractor = DetrFeatureExtractor(do_resize=True, size=1000, max_size=1000)
|
166 |
encoding = feature_extractor(image, return_tensors="pt")
|
167 |
|
168 |
+
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-structure-recognition")
|
169 |
with torch.no_grad():
|
170 |
outputs = model(**encoding)
|
171 |
|