Spaces:
Runtime error
Runtime error
Update polynomial.py
Browse files- polynomial.py +6 -0
polynomial.py
CHANGED
|
@@ -155,4 +155,10 @@ def polynomial_tab():
|
|
| 155 |
# Initialize the template display with the default degree (2) on load
|
| 156 |
template_display.value = generate_polynomial_template(2)
|
| 157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
return template_display, real_checkbox, degree_slider, coeff_input, example_btn, preview_poly_button, poly_equation_display, confirm_poly_btn, cancel_poly_btn, steps_md, plot_output, error_box
|
|
|
|
| 155 |
# Initialize the template display with the default degree (2) on load
|
| 156 |
template_display.value = generate_polynomial_template(2)
|
| 157 |
|
| 158 |
+
# β
NEW: LLM explanation section
|
| 159 |
+
llm_button = gr.Button("Explain with LLM")
|
| 160 |
+
llm_output = gr.Textbox(label="LLM Explanation", lines=4)
|
| 161 |
+
llm_button.click(fn=explain_with_llm, inputs=coeff_input, outputs=llm_output)
|
| 162 |
+
|
| 163 |
+
|
| 164 |
return template_display, real_checkbox, degree_slider, coeff_input, example_btn, preview_poly_button, poly_equation_display, confirm_poly_btn, cancel_poly_btn, steps_md, plot_output, error_box
|