Spaces:
Sleeping
Sleeping
Commit
·
65d70f7
1
Parent(s):
0ee1e49
Debug categorization
Browse files
app.py
CHANGED
@@ -107,6 +107,8 @@ def parse_from_category(category, extracted_text):
|
|
107 |
gr.Button.update(interactive=False),
|
108 |
gr.Button.update(interactive=False),
|
109 |
)
|
|
|
|
|
110 |
category = Category[category]
|
111 |
print("Parsing text from", category)
|
112 |
chain = categories.category_modules[category].chain
|
@@ -273,9 +275,9 @@ with gr.Blocks(title="Automatic Reimbursement Tool Demo") as page:
|
|
273 |
[extracted_text],
|
274 |
)
|
275 |
submit_button.click(
|
276 |
-
lambda input_file, category, chatbot, information: (
|
277 |
gr.Dropdown.update(None),
|
278 |
-
gr.Chatbot.update(
|
279 |
gr.Textbox.update(None),
|
280 |
) if input_file else (category, chatbot, information),
|
281 |
[input_file, category, chatbot, information],
|
|
|
107 |
gr.Button.update(interactive=False),
|
108 |
gr.Button.update(interactive=False),
|
109 |
)
|
110 |
+
else:
|
111 |
+
print("Updated with actual category:", category)
|
112 |
category = Category[category]
|
113 |
print("Parsing text from", category)
|
114 |
chain = categories.category_modules[category].chain
|
|
|
275 |
[extracted_text],
|
276 |
)
|
277 |
submit_button.click(
|
278 |
+
lambda input_file, category, chatbot, information: print("Resetting") or (
|
279 |
gr.Dropdown.update(None),
|
280 |
+
gr.Chatbot.update(Category.ACCOMODATION),
|
281 |
gr.Textbox.update(None),
|
282 |
) if input_file else (category, chatbot, information),
|
283 |
[input_file, category, chatbot, information],
|