selva1909 commited on
Commit
2e5d1c7
·
verified ·
1 Parent(s): 1da5101

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -13,6 +13,7 @@ import matplotlib.pyplot as plt
13
  # ------------------------------------------------
14
 
15
  def generate_3d_regression(n_points, noise):
 
16
  x1 = np.linspace(0, 10, n_points)
17
  x2 = np.linspace(0, 10, n_points)
18
  X1, X2 = np.meshgrid(x1, x2)
@@ -170,7 +171,7 @@ def train_uploaded(file, target, n_estimators, max_depth):
170
  # GRADIO DASHBOARD UI (BLUE THEME)
171
  # ------------------------------------------------
172
 
173
- with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:
174
 
175
  gr.Markdown("# 🎓 Full Machine Learning Teaching Dashboard")
176
 
@@ -216,4 +217,4 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:
216
  )
217
 
218
 
219
- demo.launch()
 
13
  # ------------------------------------------------
14
 
15
  def generate_3d_regression(n_points, noise):
16
+ n_points = int(n_points)
17
  x1 = np.linspace(0, 10, n_points)
18
  x2 = np.linspace(0, 10, n_points)
19
  X1, X2 = np.meshgrid(x1, x2)
 
171
  # GRADIO DASHBOARD UI (BLUE THEME)
172
  # ------------------------------------------------
173
 
174
+ with gr.Blocks() as demo:
175
 
176
  gr.Markdown("# 🎓 Full Machine Learning Teaching Dashboard")
177
 
 
217
  )
218
 
219
 
220
+ demo.launch(theme=gr.themes.Soft(primary_hue="blue"))