Shikun commited on
Commit
d302d23
1 Parent(s): 2cf0a99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -107,15 +107,15 @@ def download_button(object_to_download, download_filename, button_text, file_ext
107
  file_upload = st.file_uploader("Upload a csv file", type="csv")
108
  if file_upload is not None:
109
  data = pd.read_csv(file_upload)
110
- column = data["S11"].iloc[1:].values
111
- #column = data["S11"].values
112
  column = column.reshape(1,-1)
113
  st.write(column.shape)
114
- with open("automl3.pkl", "rb") as f:
115
  model = pickle.load(f)
116
  pred_clip = model.predict(column)
117
  pred_clip = np.clip(pred_clip, [0.2,0.4,3.9,0.2,13.9,13.8,13.2],[1.01,1.21,4.71,0.8,14.701,14.201,14.001])
118
- predictions = pd.DataFrame(pred_clip.tolist(), columns = ["w1","w2","w3","s1","l1","l2","l3"])
119
 
120
  is_download = st.checkbox("Download predictions", value=False)
121
  if is_download:
 
107
  file_upload = st.file_uploader("Upload a csv file", type="csv")
108
  if file_upload is not None:
109
  data = pd.read_csv(file_upload)
110
+ #column = data["S11"].iloc[1:].values
111
+ column = data["S11"].values
112
  column = column.reshape(1,-1)
113
  st.write(column.shape)
114
+ with open("automl4.pkl", "rb") as f:
115
  model = pickle.load(f)
116
  pred_clip = model.predict(column)
117
  pred_clip = np.clip(pred_clip, [0.2,0.4,3.9,0.2,13.9,13.8,13.2],[1.01,1.21,4.71,0.8,14.701,14.201,14.001])
118
+ predictions = pd.DataFrame(pred_clip[0].tolist(), columns = ["w1","w2","w3","s1","l1","l2","l3"])
119
 
120
  is_download = st.checkbox("Download predictions", value=False)
121
  if is_download: