yamunagovindha commited on
Commit
22da10a
Β·
verified Β·
1 Parent(s): 0bf35da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -29,7 +29,7 @@ def generate_data(noise=0):
29
 
30
  # Train the model
31
  def train_model(epochs, learning_rate):
32
- print(f"πŸ”„ Training started with {epochs} epochs and learning rate {learning_rate}...") # Debugging
33
 
34
  model = SimpleNN(1, 4, 1)
35
  optimizer = optim.SGD(model.parameters(), lr=learning_rate)
@@ -48,7 +48,7 @@ def train_model(epochs, learning_rate):
48
  optimizer.step()
49
  losses.append(loss.item())
50
 
51
- print("βœ… Training complete. Plotting loss...") # Debugging
52
 
53
  # Plot loss graph
54
  plt.figure(figsize=(5, 3))
@@ -77,8 +77,9 @@ iface = gr.Interface(
77
  description="Train a simple neural network and visualize the loss curve.",
78
  )
79
 
80
- print("βœ… Gradio is about to launch...") # Debugging
81
  iface.launch()
82
 
83
 
84
 
 
 
29
 
30
  # Train the model
31
  def train_model(epochs, learning_rate):
32
+ print(f"πŸ”„ Training started with {epochs} epochs and learning rate {learning_rate}...")
33
 
34
  model = SimpleNN(1, 4, 1)
35
  optimizer = optim.SGD(model.parameters(), lr=learning_rate)
 
48
  optimizer.step()
49
  losses.append(loss.item())
50
 
51
+ print("βœ… Training complete. Plotting loss...")
52
 
53
  # Plot loss graph
54
  plt.figure(figsize=(5, 3))
 
77
  description="Train a simple neural network and visualize the loss curve.",
78
  )
79
 
80
+ print("βœ… Gradio is about to launch...")
81
  iface.launch()
82
 
83
 
84
 
85
+