Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Table Transformer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def table_detector(image, THRESHOLD_PROBA):
feature_extractor = DetrFeatureExtractor(do_resize=True, size=800, max_size=800)
encoding = feature_extractor(image, return_tensors="pt")

model = DetrForObjectDetection.from_pretrained("SalML/DETR-table-detection")
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-detection")

with torch.no_grad():
outputs = model(**encoding)
Expand All @@ -163,7 +163,7 @@ def table_struct_recog(image, THRESHOLD_PROBA):
feature_extractor = DetrFeatureExtractor(do_resize=True, size=1000, max_size=1000)
encoding = feature_extractor(image, return_tensors="pt")

model = DetrForObjectDetection.from_pretrained("SalML/DETR-table-structure-recognition")
model = DetrForObjectDetection.from_pretrained("microsoft/table-transformer-structure-recognition")
with torch.no_grad():
outputs = model(**encoding)

Expand Down