Spaces:
Runtime error
Runtime error
uncomment
Browse files
app.py
CHANGED
|
@@ -39,15 +39,15 @@ EMBEDDINGS_FILE = os.path.join(EMBEDDINGS_DIR, "embeddings.pkl")
|
|
| 39 |
RAW_PHOTOS_DIR = "artifacts/raw-photos"
|
| 40 |
|
| 41 |
# Download image embeddings and raw photos
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
|
| 53 |
class TextEncoder:
|
|
|
|
| 39 |
RAW_PHOTOS_DIR = "artifacts/raw-photos"
|
| 40 |
|
| 41 |
# Download image embeddings and raw photos
|
| 42 |
+
wandb.login(key="4b5a23a662b20fdd61f2aeb5032cf56fdce278a4") # os.getenv('wandb')
|
| 43 |
+
api = wandb.Api()
|
| 44 |
+
artifact_embeddings = api.artifact("ryparmar/fashion-aggregator/unimoda-images:v1")
|
| 45 |
+
artifact_embeddings.download(EMBEDDINGS_DIR)
|
| 46 |
+
artifact_raw_photos = api.artifact("ryparmar/fashion-aggregator/unimoda-raw-images:v1")
|
| 47 |
+
artifact_raw_photos.download("artifacts")
|
| 48 |
+
|
| 49 |
+
with zipfile.ZipFile("artifacts/unimoda.zip", 'r') as zip_ref:
|
| 50 |
+
zip_ref.extractall(RAW_PHOTOS_DIR)
|
| 51 |
|
| 52 |
|
| 53 |
class TextEncoder:
|