AminFaraji commited on
Commit
a1eebfa
·
verified ·
1 Parent(s): d298f1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -52,8 +52,14 @@ CHROMA_PATH = "chroma8"
52
  db = Chroma(persist_directory=CHROMA_PATH, embedding_function=embeddings)
53
 
54
 
55
- from huggingface_hub import notebook_login
56
- notebook_login()
 
 
 
 
 
 
57
  from transformers import AutoTokenizer
58
  import transformers
59
  import torch
 
52
  db = Chroma(persist_directory=CHROMA_PATH, embedding_function=embeddings)
53
 
54
 
55
+ import os
56
+ from huggingface_hub import login
57
+
58
+ # Retrieve the token from the environment variable
59
+ token = os.getenv('HF_Token')
60
+
61
+ # Log in using the token
62
+ login(token=token)
63
  from transformers import AutoTokenizer
64
  import transformers
65
  import torch