Update app.py
Browse files
app.py
CHANGED
|
@@ -194,8 +194,8 @@ input_slope_random = gr.inputs.Slider(-8, 8, step=0.5, default=-4.5, label='(Ran
|
|
| 194 |
|
| 195 |
input_gradients = gr.inputs.Checkbox(label="Apply Gradient Descent")
|
| 196 |
|
| 197 |
-
input_learningrate = gr.inputs.Slider(0,1, step=0.001, default=0.
|
| 198 |
-
|
| 199 |
|
| 200 |
|
| 201 |
#### Define output component
|
|
@@ -204,7 +204,7 @@ output_plot1 = gr.outputs.Image(label="Regression plot")
|
|
| 204 |
|
| 205 |
### configure gradio, detailed can be found at https://www.gradio.app/docs/#i_slider
|
| 206 |
interface = gr.Interface(fn=gradient_descent,
|
| 207 |
-
inputs=[input_intercept, input_slope, input_intercept_random, input_slope_random, input_gradients, input_learningrate,
|
| 208 |
outputs=[output_plot1],
|
| 209 |
examples_per_page = 2,
|
| 210 |
examples = [[4, 3, -7, -5, True, 0.0001, 100], [1, 2, -7, -8, False, 0.0001, 100]],
|
|
|
|
| 194 |
|
| 195 |
input_gradients = gr.inputs.Checkbox(label="Apply Gradient Descent")
|
| 196 |
|
| 197 |
+
input_learningrate = gr.inputs.Slider(0,1, step=0.001, default=0.01, label='Learning Rate')
|
| 198 |
+
input_iteration = gr.inputs.Slider(1, 1000, step=5, default=200, label='Iteration')
|
| 199 |
|
| 200 |
|
| 201 |
#### Define output component
|
|
|
|
| 204 |
|
| 205 |
### configure gradio, detailed can be found at https://www.gradio.app/docs/#i_slider
|
| 206 |
interface = gr.Interface(fn=gradient_descent,
|
| 207 |
+
inputs=[input_intercept, input_slope, input_intercept_random, input_slope_random, input_gradients, input_learningrate, input_iteration],
|
| 208 |
outputs=[output_plot1],
|
| 209 |
examples_per_page = 2,
|
| 210 |
examples = [[4, 3, -7, -5, True, 0.0001, 100], [1, 2, -7, -8, False, 0.0001, 100]],
|