Spaces:
Sleeping
Sleeping
jaifar530
commited on
app.py
CHANGED
@@ -233,9 +233,13 @@ def AI_vs_AI_RandomForest_88_Samples(df):
|
|
233 |
with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'wb') as file:
|
234 |
file.write(response.content)
|
235 |
|
236 |
-
|
237 |
with open('AI_vs_AI_RandomForest_88_Samples.pkl', 'rb') as file:
|
238 |
clf_loaded = pickle.load(file)
|
|
|
|
|
|
|
|
|
239 |
|
240 |
input_features = df['paragraph'].apply(extract_features_AI_vs_AI_RandomForest_88_Samples)
|
241 |
try:
|
|
|
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)
|
245 |
try:
|