ingsimo commited on
Commit
241c067
1 Parent(s): 244b4ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,15 +1,14 @@
1
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
2
  import os
3
- from huggingface_hub import notebook_login
4
 
5
- notebook_login()
6
 
7
  access_token=os.getenv('HF_TOKEN')
8
- print(os.getenv('HF_TOKEN'))
9
 
10
  model_id = "iGeniusAI/Italia-9B-Instruct-v0.1"
11
 
12
- model = AutoModelForCausalLM.from_pretrained(model_id,token='HF_TOKEN', trust_remote_code=True)
13
  '''
14
  tokenizer = AutoTokenizer.from_pretrained(model_id,token='HF_TOKEN', trust_remote_code=True)
15
 
 
1
  from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
2
  import os
3
+ from huggingface_hub import login
4
 
 
5
 
6
  access_token=os.getenv('HF_TOKEN')
7
+ login(token=access_token)
8
 
9
  model_id = "iGeniusAI/Italia-9B-Instruct-v0.1"
10
 
11
+ model = AutoModelForCausalLM.from_pretrained(model_id,token=True, trust_remote_code=True)
12
  '''
13
  tokenizer = AutoTokenizer.from_pretrained(model_id,token='HF_TOKEN', trust_remote_code=True)
14