Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,6 +53,7 @@ def unzip_ims(zip_file_name):
|
|
53 |
embeddings = rn50_embedding_pipeline(images=im_name_l)
|
54 |
if os.path.exists(unzip_path):
|
55 |
shutil.rmtree(unzip_path)
|
|
|
56 |
return json.dumps({
|
57 |
"names": im_name_l,
|
58 |
"embs": embeddings.embeddings[0]
|
|
|
53 |
embeddings = rn50_embedding_pipeline(images=im_name_l)
|
54 |
if os.path.exists(unzip_path):
|
55 |
shutil.rmtree(unzip_path)
|
56 |
+
im_name_l = pd.Series(im_name_l).map(lambda x: x.split("/")[-1]).values.tolist()
|
57 |
return json.dumps({
|
58 |
"names": im_name_l,
|
59 |
"embs": embeddings.embeddings[0]
|