Spaces:
Running
Running
prediction
Browse files
app.py
CHANGED
@@ -165,7 +165,11 @@ def predict_files(filenames):
|
|
165 |
|
166 |
if os.path.exists(file_path):
|
167 |
# Call make_predictions automatically
|
168 |
-
prediction_result = make_predictions([file_path])
|
|
|
|
|
|
|
|
|
169 |
prediction_results.append(prediction_result[0]) # Append only the first prediction result
|
170 |
prediction_results_copy = copy.deepcopy(prediction_results)
|
171 |
|
|
|
165 |
|
166 |
if os.path.exists(file_path):
|
167 |
# Call make_predictions automatically
|
168 |
+
prediction_result = make_predictions([file_path])
|
169 |
+
if isinstance(prediction_result, list) and len(prediction_result) > 0:
|
170 |
+
prediction_results.append(prediction_result[0]) # Append only the first prediction result
|
171 |
+
else:
|
172 |
+
print(f"Error making prediction for {file}: {prediction_result}")
|
173 |
prediction_results.append(prediction_result[0]) # Append only the first prediction result
|
174 |
prediction_results_copy = copy.deepcopy(prediction_results)
|
175 |
|