Spaces:
Runtime error
Runtime error
Alex Strick van Linschoten
commited on
Commit
·
39e0016
1
Parent(s):
f5429b9
fix aspect issues
Browse files
app.py
CHANGED
@@ -123,9 +123,9 @@ def predict(pdf, confidence, generate_file):
|
|
123 |
size = img.size
|
124 |
width, height = size
|
125 |
if width > height:
|
126 |
-
pdf.add_page("L", (height, width))
|
127 |
else:
|
128 |
-
pdf.add_page("P", (width, height))
|
129 |
pred_dict = model_type.end2end_detect(
|
130 |
img,
|
131 |
valid_tfms,
|
|
|
123 |
size = img.size
|
124 |
width, height = size
|
125 |
if width > height:
|
126 |
+
pdf.add_page(orientation="L", format=(height, width))
|
127 |
else:
|
128 |
+
pdf.add_page(orientation="P", format=(width, height))
|
129 |
pred_dict = model_type.end2end_detect(
|
130 |
img,
|
131 |
valid_tfms,
|