Kerene commited on
Commit
9c94722
·
verified ·
1 Parent(s): 69ce3d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -270,10 +270,10 @@ def main():
270
 
271
 
272
  elif choice =='Machine Learning':
273
- tab1, tab2 =st.tabs([":clipboard: Simulation of your informations",":clipboard: Prediction of the dataset" ])
274
 
275
  with tab1:
276
- st.subheader("Simulation of your informations")
277
  st.write("User parameters")
278
  data=user_input_feature()
279
  model = pickle.load(open('assurance.pkl', 'rb'))
@@ -283,8 +283,11 @@ def main():
283
 
284
 
285
  with tab2:
 
 
 
286
 
287
- data= load_data("test.csv")
288
  model = pickle.load(open('assurance.pkl', 'rb'))
289
  prediction = model.predict(data)
290
  st.subheader('Prediction of the CSV')
 
270
 
271
 
272
  elif choice =='Machine Learning':
273
+ tab1, tab2 =st.tabs([":clipboard: Prediction with your informations",":clipboard: Prediction of the dataset" ])
274
 
275
  with tab1:
276
+ st.subheader("Prediction with your informations")
277
  st.write("User parameters")
278
  data=user_input_feature()
279
  model = pickle.load(open('assurance.pkl', 'rb'))
 
283
 
284
 
285
  with tab2:
286
+ uploaded_file = st.file_uploader('Upload your input CSV file',type=["csv"])
287
+ if uploaded_file:
288
+ data = load_data(uploaded_file)
289
 
290
+ #data= load_data("test.csv")
291
  model = pickle.load(open('assurance.pkl', 'rb'))
292
  prediction = model.predict(data)
293
  st.subheader('Prediction of the CSV')