Spaces:
Runtime error
Runtime error
sradc
commited on
Commit
•
ee16e23
1
Parent(s):
7b9d833
run black on nb
Browse files
_dev/add_videos_to_dataset.ipynb
CHANGED
@@ -260,11 +260,11 @@
|
|
260 |
],
|
261 |
"source": [
|
262 |
"image_paths = df[\"image_path\"].tolist()\n",
|
263 |
-
"new_df = df.rename(columns={
|
264 |
"for i, img in enumerate(tqdm(image_paths)):\n",
|
265 |
" with open(f\"../{img}\", \"rb\") as image_file:\n",
|
266 |
" encoded_string = base64.b64encode(image_file.read()).decode()\n",
|
267 |
-
" new_df.loc[i,
|
268 |
]
|
269 |
},
|
270 |
{
|
@@ -283,6 +283,7 @@
|
|
283 |
],
|
284 |
"source": [
|
285 |
"from pipeline.process_videos import DATAFRAME_PATH\n",
|
|
|
286 |
"new_df.to_parquet(DATAFRAME_PATH, index=False)"
|
287 |
]
|
288 |
},
|
|
|
260 |
],
|
261 |
"source": [
|
262 |
"image_paths = df[\"image_path\"].tolist()\n",
|
263 |
+
"new_df = df.rename(columns={\"image_path\": \"base64_image\"})\n",
|
264 |
"for i, img in enumerate(tqdm(image_paths)):\n",
|
265 |
" with open(f\"../{img}\", \"rb\") as image_file:\n",
|
266 |
" encoded_string = base64.b64encode(image_file.read()).decode()\n",
|
267 |
+
" new_df.loc[i, \"base64_image\"] = encoded_string"
|
268 |
]
|
269 |
},
|
270 |
{
|
|
|
283 |
],
|
284 |
"source": [
|
285 |
"from pipeline.process_videos import DATAFRAME_PATH\n",
|
286 |
+
"\n",
|
287 |
"new_df.to_parquet(DATAFRAME_PATH, index=False)"
|
288 |
]
|
289 |
},
|