Spaces:
Build error
Build error
Update config.py
Browse files
config.py
CHANGED
@@ -1,16 +1,24 @@
|
|
1 |
import os
|
2 |
from dotenv import load_dotenv
|
3 |
|
4 |
-
# Load
|
5 |
load_dotenv()
|
6 |
|
7 |
-
#
|
8 |
BASE_MODEL = "openlm-research/open_llama_3b"
|
9 |
-
# Other options:
|
10 |
-
#
|
11 |
-
#
|
12 |
|
13 |
-
# If you
|
|
|
14 |
MY_MODEL = None
|
15 |
|
|
|
16 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
from dotenv import load_dotenv
|
3 |
|
4 |
+
# Load environment variables from .env file
|
5 |
load_dotenv()
|
6 |
|
7 |
+
# Define the model you want to use
|
8 |
BASE_MODEL = "openlm-research/open_llama_3b"
|
9 |
+
# Other model options you can choose from:
|
10 |
+
# BASE_MODEL = "meta-llama/Llama-2-7b-chat-hf"
|
11 |
+
# BASE_MODEL = "HuggingFaceH4/zephyr-7b-beta"
|
12 |
|
13 |
+
# If you've fine-tuned the model, use the following line:
|
14 |
+
# MY_MODEL = "your-username/your-model-name" (replace with your model's Hugging Face ID)
|
15 |
MY_MODEL = None
|
16 |
|
17 |
+
# Load the Hugging Face token from the environment variable
|
18 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
19 |
+
|
20 |
+
# Check if the token is loaded properly
|
21 |
+
if HF_TOKEN is None:
|
22 |
+
print("Error: HF_TOKEN is not set. Please check your .env file.")
|
23 |
+
else:
|
24 |
+
print("Hugging Face token loaded successfully.")
|