From c2c0b9244b76ee89430bdfbf37a892c24530ef37 Mon Sep 17 00:00:00 2001 From: ChristineSchulz Date: Mon, 7 Apr 2025 08:16:09 +0200 Subject: [PATCH] Update DemoNotebook_ammico_MultimodalSearch.ipynb added df to save --- ...DemoNotebook_ammico_MultimodalSearch.ipynb | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/ammico/notebooks/DemoNotebook_ammico_MultimodalSearch.ipynb b/ammico/notebooks/DemoNotebook_ammico_MultimodalSearch.ipynb index a29ccf4..79805c1 100644 --- a/ammico/notebooks/DemoNotebook_ammico_MultimodalSearch.ipynb +++ b/ammico/notebooks/DemoNotebook_ammico_MultimodalSearch.ipynb @@ -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": {