Cookbook for multi-modal RAG eval (#13272)

pull/13304/head^2
Lance Martin 11 months ago committed by GitHub
parent 50a5c919f0
commit 39852dffd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because one or more lines are too long

@ -410,6 +410,16 @@
}
],
"source": [
"from IPython.display import display, HTML\n",
"\n",
"def plt_img_base64(img_base64):\n",
"\n",
" # Create an HTML img tag with the base64 string as the source\n",
" image_html = f'<img src=\"data:image/jpeg;base64,{img_base64}\" />'\n",
" \n",
" # Display the image by rendering the HTML\n",
" display(HTML(image_html))\n",
"\n",
"docs = retriever.get_relevant_documents(\"Woman with children\",k=10)\n",
"for doc in docs:\n",
" if is_base64(doc.page_content):\n",

Loading…
Cancel
Save