65rted6tfdjhgfjyrf commited on
Commit
0a165a0
Β·
verified Β·
1 Parent(s): e2ef7d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,11 @@ from huggingface_hub import login
6
 
7
  # Load the Hugging Face token from Secrets (recommended for public Spaces)
8
  hf_token = os.getenv("HUGGINGFACE_TOKEN")
 
 
 
 
 
9
 
10
  # Model details
11
  BASE_MODEL = "mistralai/Mistral-7B-Instruct-v0.1"
 
6
 
7
  # Load the Hugging Face token from Secrets (recommended for public Spaces)
8
  hf_token = os.getenv("HUGGINGFACE_TOKEN")
9
+ if hf_token:
10
+ login(hf_token)
11
+ print("βœ… Successfully logged in to Hugging Face Hub")
12
+ else:
13
+ print("❌ Hugging Face token not found. Make sure it's set in 'Secrets'.")
14
 
15
  # Model details
16
  BASE_MODEL = "mistralai/Mistral-7B-Instruct-v0.1"