Skip to content

Commit

Permalink
add load image function
Browse files Browse the repository at this point in the history
add load image function
  • Loading branch information
openvino-dev-samples committed Nov 19, 2024
1 parent 2a531e2 commit 655ab9c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 241 deletions.
13 changes: 13 additions & 0 deletions notebooks/multimodal-rag/gradio_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def make_demo(
build_index: Callable,
search: Callable,
run_fn: Callable,
load_img: Callable,
stop_fn: Callable,
):

Expand Down Expand Up @@ -105,6 +106,12 @@ def make_demo(
chatbot,
queue=True,
)
.then(
load_img,
[chatbot, image_list],
chatbot,
queue=True,
)
)
submit_click_event = (
submit.click(handle_user_message, [msg, chatbot], [msg, chatbot], queue=False)
Expand All @@ -120,6 +127,12 @@ def make_demo(
chatbot,
queue=True,
)
.then(
load_img,
[chatbot, image_list],
chatbot,
queue=True,
)
)
stop.click(
fn=stop_fn,
Expand Down
118 changes: 65 additions & 53 deletions notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb

Large diffs are not rendered by default.

188 changes: 0 additions & 188 deletions notebooks/multimodal-rag/ov_phi3_llamaindex.py

This file was deleted.

0 comments on commit 655ab9c

Please sign in to comment.