Spaces:
Running
Running
Amamrnaf
commited on
Commit
·
f68828e
1
Parent(s):
a36aede
`Added new options to process_pdf function: Noc_timesheet_rotational and Noc_invoice`
Browse files
app.py
CHANGED
@@ -161,8 +161,14 @@ def process_pdf(file, option):
|
|
161 |
Noc_timeSheet_pdf_to_img(file_path,"output.jpg")
|
162 |
result = get_image_informations("output.jpg",Noc_Res_timesheet_prompt,Noc_Res_timeSheet_parser)
|
163 |
return result
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
# else:
|
167 |
# return "Invalid option selected."
|
168 |
except Exception as e:
|
|
|
161 |
Noc_timeSheet_pdf_to_img(file_path,"output.jpg")
|
162 |
result = get_image_informations("output.jpg",Noc_Res_timesheet_prompt,Noc_Res_timeSheet_parser)
|
163 |
return result
|
164 |
+
elif option == "Noc_timesheet_rotational":
|
165 |
+
Noc_timeSheet_pdf_to_img(file_path,"output.jpg")
|
166 |
+
result = get_image_informations("output.jpg",Noc_Rot_timesheet_prompt,Noc_Rot_timeSheet_parser)
|
167 |
+
return result
|
168 |
+
elif option=="Noc_invoice":
|
169 |
+
result = noc_invoice_extraction(file_path,save_dir)
|
170 |
+
return result
|
171 |
+
|
172 |
# else:
|
173 |
# return "Invalid option selected."
|
174 |
except Exception as e:
|