jaifar530 commited on
Commit
6b76e2b
·
unverified ·
1 Parent(s): 39e6ad2
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -230,15 +230,18 @@ def AI_vs_AI_RandomForest_88_Samples(df):
230
  response = requests.get(url, headers=headers)
231
 
232
  # Save the file
233
- with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'wb') as file:
 
234
  file.write(response.content)
 
 
235
 
236
  try:
237
  with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'rb') as file:
238
  clf_loaded = pickle.load(file)
239
  except Exception as e:
240
  st.write(f"An error occurred: {str(e)}")
241
- return # This will exit the function
242
 
243
 
244
  input_features = df['paragraph'].apply(extract_features_AI_vs_AI_RandomForest_88_Samples)
 
230
  response = requests.get(url, headers=headers)
231
 
232
  # Save the file
233
+ try:
234
+ with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'wb') as file:
235
  file.write(response.content)
236
+ except Exception as e:
237
+ st.write(f"An error occurred: {str(e)}")
238
 
239
  try:
240
  with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'rb') as file:
241
  clf_loaded = pickle.load(file)
242
  except Exception as e:
243
  st.write(f"An error occurred: {str(e)}")
244
+ return # This will exit the function
245
 
246
 
247
  input_features = df['paragraph'].apply(extract_features_AI_vs_AI_RandomForest_88_Samples)