Skip to content

Commit

Permalink
fix: session id
Browse files Browse the repository at this point in the history
  • Loading branch information
JieGenius committed Feb 5, 2024
1 parent f7cab9b commit 760aa36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from utils.actions.fundus_diagnosis import FundusDiagnosis
from lagent.llms.meta_template import INTERNLM2_META as META
from utils.agent import MyReAct
from streamlit.runtime.scriptrunner import get_script_run_ctx

# MODEL_DIR = "/share/model_repos/internlm2-chat-7b-4bits"
MODEL_DIR = "./OpenLMLab/InternLM2-chat-7b"
Expand Down Expand Up @@ -251,7 +252,7 @@ def main():
else:
user_input_with_image_info = user_input
user_input_render = user_input
logger.info("获取到用户输入:" + user_input + f" session id: {st.session_state.session_id}")
logger.info("获取到用户输入:" + user_input + f" session id: {get_script_run_ctx().session_id}")
st.session_state['ui'].render_user(user_input_render)
st.session_state['user'].append(user_input_render)

Expand Down

0 comments on commit 760aa36

Please sign in to comment.