Update app.py
Browse files
app.py
CHANGED
|
@@ -386,6 +386,11 @@ with gr.Blocks(css="""
|
|
| 386 |
with gr.Row():
|
| 387 |
with gr.Column(scale=2):
|
| 388 |
logs_input = gr.Textbox(label="Project Logs", lines=5, placeholder="Enter project logs (e.g., 'Project complete, handover done')")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 389 |
qa_input = gr.Dropdown(
|
| 390 |
label="QA Report",
|
| 391 |
choices=["Approved", "Passed", "Cleared", "Pending", "Not Started"],
|
|
@@ -414,8 +419,8 @@ with gr.Blocks(css="""
|
|
| 414 |
|
| 415 |
# Chain the evaluation, PDF generation, and Salesforce record creation
|
| 416 |
submit_btn.click(
|
| 417 |
-
fn=
|
| 418 |
-
inputs=[logs_input, qa_input, punch_input],
|
| 419 |
outputs=[
|
| 420 |
score_output, checklist_output, missing_output, status_output, progress_output,
|
| 421 |
gr.State(), gr.State(), gr.State(), gr.State(), open_punch_items_output, status_output
|
|
|
|
| 386 |
with gr.Row():
|
| 387 |
with gr.Column(scale=2):
|
| 388 |
logs_input = gr.Textbox(label="Project Logs", lines=5, placeholder="Enter project logs (e.g., 'Project complete, handover done')")
|
| 389 |
+
log_keywords_input = gr.Textbox(
|
| 390 |
+
label="Log Keywords (Regex, Optional)",
|
| 391 |
+
placeholder="Enter keywords or regex (e.g., 'project is not completed' or 'complete|finished|done')",
|
| 392 |
+
value=""
|
| 393 |
+
)
|
| 394 |
qa_input = gr.Dropdown(
|
| 395 |
label="QA Report",
|
| 396 |
choices=["Approved", "Passed", "Cleared", "Pending", "Not Started"],
|
|
|
|
| 419 |
|
| 420 |
# Chain the evaluation, PDF generation, and Salesforce record creation
|
| 421 |
submit_btn.click(
|
| 422 |
+
fn=evaluate_readiness,
|
| 423 |
+
inputs=[logs_input, qa_input, punch_input, log_keywords_input],
|
| 424 |
outputs=[
|
| 425 |
score_output, checklist_output, missing_output, status_output, progress_output,
|
| 426 |
gr.State(), gr.State(), gr.State(), gr.State(), open_punch_items_output, status_output
|