Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,15 @@ def demo_process(input_pdf):
|
|
22 |
f.write(image_bytes)
|
23 |
|
24 |
# zip_path = "images.zip"
|
25 |
-
|
26 |
# output = model.inference(image=image_name, prompt=task_prompt)["predictions"][0]
|
27 |
# with zipfile.ZipFile(zip_path, "w") as zipf:
|
28 |
# zipf.write(os.path.join(temp_dir, image_name), image_name)
|
29 |
# os.remove(image_path)
|
30 |
# os.rmdir(temp_dir)
|
|
|
31 |
|
32 |
-
return
|
33 |
|
34 |
|
35 |
task_name = "SGSInvoice"
|
|
|
22 |
f.write(image_bytes)
|
23 |
|
24 |
# zip_path = "images.zip"
|
25 |
+
image_path = os.path.join(temp_dir, image_name)
|
26 |
# output = model.inference(image=image_name, prompt=task_prompt)["predictions"][0]
|
27 |
# with zipfile.ZipFile(zip_path, "w") as zipf:
|
28 |
# zipf.write(os.path.join(temp_dir, image_name), image_name)
|
29 |
# os.remove(image_path)
|
30 |
# os.rmdir(temp_dir)
|
31 |
+
image_path = Image.fromarray(image_path)
|
32 |
|
33 |
+
return image_path
|
34 |
|
35 |
|
36 |
task_name = "SGSInvoice"
|