Spaces:
Sleeping
Sleeping
ankur-bohra
commited on
Commit
•
3e14fe8
1
Parent(s):
dbc99f7
Remove resetting
Browse files- app.py +8 -8
- categories/accomodation/model.py +1 -1
app.py
CHANGED
@@ -273,14 +273,14 @@ with gr.Blocks(title="Automatic Reimbursement Tool Demo") as page:
|
|
273 |
[extracted_text],
|
274 |
)
|
275 |
submit_button.click(
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
)
|
284 |
extracted_text.change(
|
285 |
categorize_extracted_text,
|
286 |
[extracted_text],
|
|
|
273 |
[extracted_text],
|
274 |
)
|
275 |
submit_button.click(
|
276 |
+
# lambda input_file, category, chatbot, information: (print("File supplied, resetting") or (
|
277 |
+
# gr.Dropdown.update(Category.ACCOMODATION),
|
278 |
+
# gr.Chatbot.update(None),
|
279 |
+
# gr.Textbox.update(None),
|
280 |
+
# )) if input_file else (print("File not supplied, keeping") or print(category, chatbot, information)),
|
281 |
+
# [input_file, category, chatbot, information],
|
282 |
+
# [category, chatbot, information],
|
283 |
+
# )
|
284 |
extracted_text.change(
|
285 |
categorize_extracted_text,
|
286 |
[extracted_text],
|
categories/accomodation/model.py
CHANGED
@@ -18,7 +18,7 @@ class InformationExtractedFromABillReceipt(BaseModel):
|
|
18 |
9. Bill date: [Bill Date]
|
19 |
"""
|
20 |
|
21 |
-
|
22 |
address: str = Field(..., title="The address of the hotel")
|
23 |
bill_number: str = Field(..., title="The bill number/invoice number")
|
24 |
booking_id: str = Field(..., title="The booking ID/confirmation ID/booking number")
|
|
|
18 |
9. Bill date: [Bill Date]
|
19 |
"""
|
20 |
|
21 |
+
hotel_name: str = Field(..., title="The name of the hotel")
|
22 |
address: str = Field(..., title="The address of the hotel")
|
23 |
bill_number: str = Field(..., title="The bill number/invoice number")
|
24 |
booking_id: str = Field(..., title="The booking ID/confirmation ID/booking number")
|