LVKinyanjui commited on
Commit
ed42113
1 Parent(s): 38013b3

Another permission error fix.

Browse files
Files changed (1) hide show
  1. app_inference.py +2 -5
app_inference.py CHANGED
@@ -11,7 +11,7 @@ SYSTEM_MESSAGE = "You are a hepful, knowledgeable assistant"
11
 
12
  # ENV VARS
13
  # To avert Permision error with transformer and hf models
14
- os.environ['SENTENCE_TRANSFORMERS_HOME'] = '.'
15
  token = os.getenv("HF_TOKEN_WRITE") # Must be a write token
16
  # STREAMLIT UI AREA
17
 
@@ -21,10 +21,7 @@ submit = st.button("Submit")
21
 
22
  # MODEL AREA
23
  # Use the token to authenticate
24
- login(token=token,
25
- write_permission=True # Must be set to True when we pass in our own token
26
- # Otherwise we get Permission Denied.
27
- )
28
  model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct"
29
 
30
  @st.cache_resource
 
11
 
12
  # ENV VARS
13
  # To avert Permision error with transformer and hf models
14
+ # os.environ['SENTENCE_TRANSFORMERS_HOME'] = '.'
15
  token = os.getenv("HF_TOKEN_WRITE") # Must be a write token
16
  # STREAMLIT UI AREA
17
 
 
21
 
22
  # MODEL AREA
23
  # Use the token to authenticate
24
+ login(token=token, write_permission=True)
 
 
 
25
  model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct"
26
 
27
  @st.cache_resource