Sidharthan commited on
Commit
e6db8ab
1 Parent(s): 6acb880

Fixing authentication issues

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -11,13 +11,16 @@ os.environ['HF_HOME'] = '/app/cache'
11
 
12
  app = FastAPI(title="Gemma Script Generator API")
13
 
 
 
14
  # Load model and tokenizer
15
  MODEL_NAME = "Sidharthan/gemma2_scripter"
16
 
17
  try:
18
  tokenizer = AutoTokenizer.from_pretrained(
19
  MODEL_NAME,
20
- trust_remote_code=True
 
21
  )
22
  model = AutoPeftModelForCausalLM.from_pretrained(
23
  MODEL_NAME,
 
11
 
12
  app = FastAPI(title="Gemma Script Generator API")
13
 
14
+ hf_token = os.getenv('HF_TOKEN')
15
+
16
  # Load model and tokenizer
17
  MODEL_NAME = "Sidharthan/gemma2_scripter"
18
 
19
  try:
20
  tokenizer = AutoTokenizer.from_pretrained(
21
  MODEL_NAME,
22
+ trust_remote_code=True,
23
+ use_auth_token = hf_token
24
  )
25
  model = AutoPeftModelForCausalLM.from_pretrained(
26
  MODEL_NAME,