Shreyas094 commited on
Commit
30417d7
1 Parent(s): 1c6c674

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -4,6 +4,14 @@ from bs4 import BeautifulSoup
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
5
  import torch
6
  from huggingface_hub import login
 
 
 
 
 
 
 
 
7
 
8
  !huggingface-cli login
9
 
 
4
  from transformers import AutoTokenizer, AutoModelForCausalLM
5
  import torch
6
  from huggingface_hub import login
7
+ import os
8
+
9
+
10
+ # Retrieve the Hugging Face token from secrets (replace 'HUGGINGFACE_TOKEN' with your secret key)
11
+ hf_token = os.getenv('My_Token')
12
+
13
+ # Log in to Hugging Face
14
+ login(token=hf_token)
15
 
16
  !huggingface-cli login
17