uartimcs commited on
Commit
9b12c6c
·
verified ·
1 Parent(s): bed03e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -20,19 +20,16 @@ def demo_process(input_pdf):
20
 
21
  with open(os.path.join(temp_dir, image_name), "wb") as f:
22
  f.write(image_bytes)
23
-
24
-
25
 
26
  # zip_path = "images.zip"
27
  # image_path = os.path.join(temp_dir, image_name)
28
- output = model.inference(image=image_name, prompt=task_prompt)["predictions"][0]
29
  # with zipfile.ZipFile(zip_path, "w") as zipf:
30
- # zipf.write(os.path.join(temp_dir, image_name), image_name)
31
-
32
- os.remove(image_path)
33
- os.rmdir(temp_dir)
34
 
35
- return output
36
 
37
 
38
  task_name = "SGSInvoice"
 
20
 
21
  with open(os.path.join(temp_dir, image_name), "wb") as f:
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
 
32
+ return image_name
33
 
34
 
35
  task_name = "SGSInvoice"