Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -391,7 +391,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 391 |
run_btn = gr.Button("Check compliance", elem_id="compliance-btn")
|
| 392 |
out = gr.HTML(label="Compliance Result")
|
| 393 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 394 |
-
run_btn.click(check_compliance, inputs=inp, outputs=out)
|
| 395 |
|
| 396 |
with gr.TabItem("NRL ChatBot"):
|
| 397 |
gr.Markdown("""# RAG Chatbot - NRL Documents""")
|
|
@@ -410,8 +410,8 @@ with gr.Blocks(css=css) as demo:
|
|
| 410 |
submit_btn = gr.Button("Submit")
|
| 411 |
|
| 412 |
# Events
|
| 413 |
-
submit_btn.click(respond, inputs=[msg, chatbot, doc_selector], outputs=[msg, chatbot])
|
| 414 |
-
msg.submit(respond, inputs=[msg, chatbot, doc_selector], outputs=[msg, chatbot])
|
| 415 |
with gr.TabItem("Compliance Check of user technical doc"):
|
| 416 |
with gr.Row():
|
| 417 |
inp_tech = gr.File(
|
|
@@ -422,7 +422,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 422 |
run_btn_tech = gr.Button("Check compliance of technical document", elem_id="compliance-btn-tech")
|
| 423 |
out_tech = gr.HTML(label="Compliance Result of technical document")
|
| 424 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 425 |
-
run_btn_tech.click(check_compliance_tech, inputs=inp_tech, outputs=out_tech)
|
| 426 |
with gr.TabItem("CQ generation - OEM "):
|
| 427 |
with gr.Row():
|
| 428 |
inp_OEM_import = gr.File(
|
|
@@ -439,7 +439,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 439 |
run_btn_oemImport = gr.Button("Generate CQ of OEM-offer", elem_id="generateOEMImport-btn")
|
| 440 |
out_tech = gr.HTML(label="Generated CQ")
|
| 441 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 442 |
-
run_btn_oemImport.click(generateCqOemImport, inputs=inp_OEM_import, outputs=out_tech)
|
| 443 |
with gr.TabItem("Generate TAC"):
|
| 444 |
gr.HTML("""
|
| 445 |
<div style="color: white; background: black; padding: 20px; text-align: center; font-size: 24px;">
|
|
|
|
| 391 |
run_btn = gr.Button("Check compliance", elem_id="compliance-btn")
|
| 392 |
out = gr.HTML(label="Compliance Result")
|
| 393 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 394 |
+
run_btn.click(check_compliance, inputs=inp, outputs=out, api_name="manabAdminNotCheck")
|
| 395 |
|
| 396 |
with gr.TabItem("NRL ChatBot"):
|
| 397 |
gr.Markdown("""# RAG Chatbot - NRL Documents""")
|
|
|
|
| 410 |
submit_btn = gr.Button("Submit")
|
| 411 |
|
| 412 |
# Events
|
| 413 |
+
submit_btn.click(respond, inputs=[msg, chatbot, doc_selector], outputs=[msg, chatbot], api_name="manabChat")
|
| 414 |
+
msg.submit(respond, inputs=[msg, chatbot, doc_selector], outputs=[msg, chatbot], api_name="manabChat")
|
| 415 |
with gr.TabItem("Compliance Check of user technical doc"):
|
| 416 |
with gr.Row():
|
| 417 |
inp_tech = gr.File(
|
|
|
|
| 422 |
run_btn_tech = gr.Button("Check compliance of technical document", elem_id="compliance-btn-tech")
|
| 423 |
out_tech = gr.HTML(label="Compliance Result of technical document")
|
| 424 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 425 |
+
run_btn_tech.click(check_compliance_tech, inputs=inp_tech, outputs=out_tech, api_name="manabComplianceCheck")
|
| 426 |
with gr.TabItem("CQ generation - OEM "):
|
| 427 |
with gr.Row():
|
| 428 |
inp_OEM_import = gr.File(
|
|
|
|
| 439 |
run_btn_oemImport = gr.Button("Generate CQ of OEM-offer", elem_id="generateOEMImport-btn")
|
| 440 |
out_tech = gr.HTML(label="Generated CQ")
|
| 441 |
#out = gr.Textbox(lines=15, label="Compliance Result",elem_id="compliance-out")
|
| 442 |
+
run_btn_oemImport.click(generateCqOemImport, inputs=inp_OEM_import, outputs=out_tech, api_name="manabCQGeneration")
|
| 443 |
with gr.TabItem("Generate TAC"):
|
| 444 |
gr.HTML("""
|
| 445 |
<div style="color: white; background: black; padding: 20px; text-align: center; font-size: 24px;">
|