Spaces:
Runtime error
Runtime error
AminFaraji
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -52,8 +52,14 @@ CHROMA_PATH = "chroma8"
|
|
52 |
db = Chroma(persist_directory=CHROMA_PATH, embedding_function=embeddings)
|
53 |
|
54 |
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|