Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def gradient_descent(intercept=4, slope=3, intercept_random=4, slope_random=3, g
|
|
| 31 |
y_predict
|
| 32 |
|
| 33 |
### (4) Draw baseline linear Line
|
| 34 |
-
fig = plt.figure(figsize=(12,
|
| 35 |
|
| 36 |
plt.subplot(3,1,1)
|
| 37 |
plt.plot(X, y_predict, "r-", linewidth=2, label = "Line of best fit")
|
|
@@ -194,7 +194,7 @@ 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,
|
| 198 |
input_interation = gr.inputs.Slider(1, 1000, step=2, default=100, label='Iteration')
|
| 199 |
|
| 200 |
|
|
|
|
| 31 |
y_predict
|
| 32 |
|
| 33 |
### (4) Draw baseline linear Line
|
| 34 |
+
fig = plt.figure(figsize=(12,20))
|
| 35 |
|
| 36 |
plt.subplot(3,1,1)
|
| 37 |
plt.plot(X, y_predict, "r-", linewidth=2, label = "Line of best fit")
|
|
|
|
| 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.001, label='Learning Rate')
|
| 198 |
input_interation = gr.inputs.Slider(1, 1000, step=2, default=100, label='Iteration')
|
| 199 |
|
| 200 |
|