Spaces:
Sleeping
Sleeping
Update utils/plot.py
Browse files- utils/plot.py +8 -8
utils/plot.py
CHANGED
|
@@ -167,18 +167,18 @@ def count_instance(result, filenames, uuid, width_list, orientation_list, image_
|
|
| 167 |
|
| 168 |
print("This executed 5")
|
| 169 |
|
| 170 |
-
|
| 171 |
|
| 172 |
-
|
| 173 |
|
| 174 |
-
|
| 175 |
-
|
| 176 |
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
imgkit.from_file(f'output/{uuid}/out.html', f'output/{uuid}/out.jpg', options=opt)
|
| 181 |
-
return f'output/{uuid}/
|
| 182 |
|
| 183 |
|
| 184 |
|
|
|
|
| 167 |
|
| 168 |
print("This executed 5")
|
| 169 |
|
| 170 |
+
pdfs = [f'output/{uuid}/report_ref.pdf', f'output/{uuid}/report_batch.pdf']
|
| 171 |
|
| 172 |
+
merger = PdfMerger()
|
| 173 |
|
| 174 |
+
for pdf in pdfs:
|
| 175 |
+
merger.append(pdf)
|
| 176 |
|
| 177 |
+
merger.write(f'output/{uuid}/report.pdf')
|
| 178 |
+
merger.close()
|
| 179 |
+
options = {'width': 1280, 'disable-smart-width': ''}
|
| 180 |
imgkit.from_file(f'output/{uuid}/out.html', f'output/{uuid}/out.jpg', options=opt)
|
| 181 |
+
return f'output/{uuid}/report.pdf', df
|
| 182 |
|
| 183 |
|
| 184 |
|