Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -163,12 +163,13 @@ with gr.Blocks() as demo:
|
|
| 163 |
response_box = gr.Markdown(label="Chatbot Response")
|
| 164 |
|
| 165 |
# Define button actions
|
| 166 |
-
predict_button.click(fn=
|
| 167 |
inputs=[air_temp, proc_temp, speed, torque, tool_wear],
|
| 168 |
-
outputs=output_status)
|
| 169 |
|
| 170 |
-
submit_btn
|
| 171 |
-
|
|
|
|
| 172 |
outputs=response_box)
|
| 173 |
|
| 174 |
# Display the PDF content
|
|
|
|
| 163 |
response_box = gr.Markdown(label="Chatbot Response")
|
| 164 |
|
| 165 |
# Define button actions
|
| 166 |
+
predict_button.click(fn=predict_status,
|
| 167 |
inputs=[air_temp, proc_temp, speed, torque, tool_wear],
|
| 168 |
+
outputs=[output_status, gr.Variable("reasons")])
|
| 169 |
|
| 170 |
+
# Correcting the submit_btn action to extract reasons properly
|
| 171 |
+
submit_btn.click(fn=lambda reasons: handle_query(reasons),
|
| 172 |
+
inputs=gr.Variable("reasons"),
|
| 173 |
outputs=response_box)
|
| 174 |
|
| 175 |
# Display the PDF content
|