ZainKhan007 commited on
Commit
a75aca4
·
verified ·
1 Parent(s): 1d644b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,8 +58,8 @@ if datasets:
58
 
59
  # Model Training
60
  if st.sidebar.button("Train Model"):
61
- epochs = st.sidebar.slider("Number of Epochs", 10, 100, 50)
62
- batch_size = st.sidebar.slider("Batch Size", 10, 100, 20)
63
  history = model.fit(X_train_scaled, y_train, epochs=epochs, batch_size=batch_size, validation_split=0.2)
64
  st.success("Model trained successfully!")
65
 
@@ -69,7 +69,7 @@ if datasets:
69
 
70
  # Prediction Section
71
  if st.button("Make Predictions"):
72
- input_features = [st.number_input(f"Input {col}", step=0.01) for col in X.columns]
73
  input_scaled = scaler.transform([input_features])
74
  prediction = model.predict(input_scaled)
75
  predicted_class = np.argmax(prediction, axis=1)
 
58
 
59
  # Model Training
60
  if st.sidebar.button("Train Model"):
61
+ epochs = st.sidebar.slider("Number of Epochs", 50, 100, 10)
62
+ batch_size = st.sidebar.slider("Batch Size", 10, 100, 32)
63
  history = model.fit(X_train_scaled, y_train, epochs=epochs, batch_size=batch_size, validation_split=0.2)
64
  st.success("Model trained successfully!")
65
 
 
69
 
70
  # Prediction Section
71
  if st.button("Make Predictions"):
72
+ input_features = [st.number_input(f"Input {col}", step=0.00001) for col in X.columns]
73
  input_scaled = scaler.transform([input_features])
74
  prediction = model.predict(input_scaled)
75
  predicted_class = np.argmax(prediction, axis=1)