From 259d54ed0ade2428c8fc31fba97f96288bd23a81 Mon Sep 17 00:00:00 2001 From: JamePeng Date: Sun, 18 Aug 2024 23:53:07 +0800 Subject: [PATCH] Update web_demo_streamlit-2_5.py Fixed a bug where imagefile was not initialized when no image was passed in --- web_demo_streamlit-2_5.py | 1 + 1 file changed, 1 insertion(+) diff --git a/web_demo_streamlit-2_5.py b/web_demo_streamlit-2_5.py index bf100ce..4cee58c 100644 --- a/web_demo_streamlit-2_5.py +++ b/web_demo_streamlit-2_5.py @@ -88,6 +88,7 @@ if user_text: # Generate reply using the model model = st.session_state.model tokenizer = st.session_state.tokenizer + imagefile = None with st.chat_message(A_NAME, avatar="assistant"): # If the previous message contains an image, pass the image to the model