Spaces:
Sleeping
Sleeping
fix path image
Browse files
pages/object_detection.py
CHANGED
|
@@ -209,8 +209,10 @@ st.markdown("### Select an image 🖼️")
|
|
| 209 |
image_ = None
|
| 210 |
fashion_images_path = r"data/dior_show/images"
|
| 211 |
list_images = os.listdir(fashion_images_path)
|
| 212 |
-
|
| 213 |
-
image_ = os.path.join(fashion_images_path,
|
|
|
|
|
|
|
| 214 |
|
| 215 |
# image_ = None
|
| 216 |
# select_image_box = st.radio(
|
|
@@ -332,7 +334,7 @@ if run_model:
|
|
| 332 |
# with open(os.path.join(pickle_file_path, f"{image_name}_results.pkl"), 'wb') as file:
|
| 333 |
# pickle.dump(outputs, file)
|
| 334 |
|
| 335 |
-
image_name =
|
| 336 |
path_load_pickle = os.path.join(pickle_file_path, f"{image_name}_results.pkl")
|
| 337 |
with open(path_load_pickle, 'rb') as pickle_file:
|
| 338 |
outputs = pickle.load(pickle_file)
|
|
|
|
| 209 |
image_ = None
|
| 210 |
fashion_images_path = r"data/dior_show/images"
|
| 211 |
list_images = os.listdir(fashion_images_path)
|
| 212 |
+
image_name = st.selectbox("Select the image you wish to run the model on", list_images)
|
| 213 |
+
image_ = os.path.join(fashion_images_path, image_name)
|
| 214 |
+
st.write(image_name)
|
| 215 |
+
|
| 216 |
|
| 217 |
# image_ = None
|
| 218 |
# select_image_box = st.radio(
|
|
|
|
| 334 |
# with open(os.path.join(pickle_file_path, f"{image_name}_results.pkl"), 'wb') as file:
|
| 335 |
# pickle.dump(outputs, file)
|
| 336 |
|
| 337 |
+
image_name = image_name[:5]
|
| 338 |
path_load_pickle = os.path.join(pickle_file_path, f"{image_name}_results.pkl")
|
| 339 |
with open(path_load_pickle, 'rb') as pickle_file:
|
| 340 |
outputs = pickle.load(pickle_file)
|