fvanlitsenburg / promptbox

Tying together LLM prompts graphically
8 stars 1 forks source link

AttributeError: st.session_state has no attribute "modellist". Did you forget to initialize it? #3

Open Netmees opened 11 months ago

Netmees commented 11 months ago

lots of trobleshooting to try the app... first i must to move the models outside the folder (better make a symlink) to the upper folder ../hf then i have to download the binaries from huggface from the command line telling me not found
i have downloaded and then throws error

AttributeError: st.session_state has no attribute "modellist". Did you forget to initialize it?

i have tried to edit the Home.py adding

import streamlit as st

Session State also supports the attribute based syntax

if 'modellist' not in st.session_state: st.session_state['modellist'] = 'value'

but not working....

another error i get is in the binaries... i have downloaded....

SafetensorError: Error while deserializing header: HeaderTooLarge

maybe some errors in the 

-> i have downloades too from huggface.... any other way to initialize? /hf/flan-t5-base /hf/fastchat-t5-3b-v1.0

fvanlitsenburg commented 11 months ago

Hi Netmees,

Sorry to hear you're having trouble getting this started. There are a couple of issues running at the same time here, some of which could also be caused by dependency issues.

Let's start with the streamlit error,

AttributeError: st.session_state has no attribute "modellist". Did you forget to initialize it?

Are you running streamlit run ui/Home.py from the Promptbox main directory? As this should have the relevant code:

st.session_state['modellist'] = ['llama-cpp','nous']