Gova823 commited on
Commit
8b2c8ef
·
verified ·
1 Parent(s): 8541d28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -66,8 +66,17 @@ for i in range(1, hidden_layers + 1):
66
  st.error(f"Invalid input for the number of neurons in Layer {i}. Please enter an integer.")
67
 
68
  # Batch Size
69
- if data_set != "None":
70
- df = pd.read_csv('data_set')
 
 
 
 
 
 
 
 
 
71
  X = df.iloc[:, :2].values
72
  y = df.iloc[:, -1].values
73
  batch_size = st.sidebar.select_slider("Batch Size", options=[i for i in range(1, X.shape[0] + 1)])
 
66
  st.error(f"Invalid input for the number of neurons in Layer {i}. Please enter an integer.")
67
 
68
  # Batch Size
69
+ if data_set:
70
+ try:
71
+ # Read the CSV file using the provided file name
72
+ df = pd.read_csv(data_set)
73
+
74
+ # Display the DataFrame
75
+ st.write(df)
76
+ except FileNotFoundError:
77
+ st.error(f"File '{data_set}' not found. Please check the file name and try again.")
78
+ except Exception as e:
79
+ st.error(f"An error occurred: {e}")
80
  X = df.iloc[:, :2].values
81
  y = df.iloc[:, -1].values
82
  batch_size = st.sidebar.select_slider("Batch Size", options=[i for i in range(1, X.shape[0] + 1)])