зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-29 13:06:04 +02:00
Update DemoNotebook_ammico_MultimodalSearch.ipynb
added df to save
Этот коммит содержится в:
родитель
0cd86e4b8a
Коммит
c2c0b9244b
@ -277,8 +277,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import importlib_resources # only require for image query example\n",
|
||||
"# image_example_query = str(importlib_resources.files(\"ammico\") / \"data\" / \"test-crop-image.png\") # creating the path to the image for the image query example\n",
|
||||
"image_example_query = \"../../../test-images-politicians/5e4c7722-d620-42ab-915e-9b1a048e2992Original.jpg\" \n",
|
||||
"\n",
|
||||
"search_query = [\n",
|
||||
@ -390,8 +388,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import importlib_resources # only require for image query example\n",
|
||||
"# image_example_query = str(importlib_resources.files(\"ammico\") / \"data\" / \"test-crop-image.png\") # creating the path to the image for the image query example\n",
|
||||
"image_example_query = \"../../../test-images-politicians/5e4c7722-d620-42ab-915e-9b1a048e2992Original.jpg\" # creating the path to the image for the image query example\n",
|
||||
"image_example_query2 = \"../../../test-images-politicians/service-pnp-ppbd-00600-00608_150px.jpg\"\n",
|
||||
"\n",
|
||||
@ -459,7 +455,29 @@
|
||||
"source": [
|
||||
"# Not yet compatible with show_results due to dictionary design"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# convert to dataframe\n",
|
||||
"df = ammico.get_dataframe(image_dict)\n",
|
||||
"df"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# save to csv\n",
|
||||
"df.to_csv(\"../../../test-images-politicians/data_out.csv\")"
|
||||
]
|
||||
},
|
||||
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user