Spaces:
Runtime error
Runtime error
finished app no frills
Browse files
app.py
CHANGED
|
@@ -115,9 +115,9 @@ def train_and_inference(api_key, ontology_id, model_run_id):
|
|
| 115 |
with open(file_path, 'wb') as file:
|
| 116 |
for chunk in response.iter_content(8192):
|
| 117 |
file.write(chunk)
|
| 118 |
-
|
| 119 |
-
else:
|
| 120 |
-
|
| 121 |
except Exception as e:
|
| 122 |
st.write(f"An error occurred: {e}")
|
| 123 |
|
|
@@ -137,7 +137,7 @@ def train_and_inference(api_key, ontology_id, model_run_id):
|
|
| 137 |
|
| 138 |
destination_folder = os.path.join(BASE_DIR, data_split, label)
|
| 139 |
filename = os.path.basename(image_url)
|
| 140 |
-
st.write(filename)
|
| 141 |
|
| 142 |
download_and_save_image(image_url, destination_folder, filename)
|
| 143 |
|
|
|
|
| 115 |
with open(file_path, 'wb') as file:
|
| 116 |
for chunk in response.iter_content(8192):
|
| 117 |
file.write(chunk)
|
| 118 |
+
# st.write(f"Image downloaded and saved: {file_path}")
|
| 119 |
+
# else:
|
| 120 |
+
# st.write(f"Failed to download the image. Status code: {response.status_code}")
|
| 121 |
except Exception as e:
|
| 122 |
st.write(f"An error occurred: {e}")
|
| 123 |
|
|
|
|
| 137 |
|
| 138 |
destination_folder = os.path.join(BASE_DIR, data_split, label)
|
| 139 |
filename = os.path.basename(image_url)
|
| 140 |
+
# st.write(filename)
|
| 141 |
|
| 142 |
download_and_save_image(image_url, destination_folder, filename)
|
| 143 |
|