mery22 commited on
Commit
397c421
1 Parent(s): 3e69ed1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -20,13 +20,13 @@ import transformers
20
  import transformers
21
  from transformers import pipeline
22
 
23
- # Load model directly
24
- from transformers import AutoTokenizer, AutoModelForCausalLM
25
-
26
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
27
-
28
- tokenizer.pad_token = tokenizer.eos_token
29
- tokenizer.padding_side = "right"
30
 
31
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
32
  tokenizer.pad_token = tokenizer.eos_token
 
20
  import transformers
21
  from transformers import pipeline
22
 
23
+ import transformers
24
+ model_name='mistralai/Mistral-7B-Instruct-v0.1'
25
+ from huggingface_hub import login
26
+ login(token = 'HF_TOKEN')
27
+ model_config = transformers.AutoConfig.from_pretrained(
28
+ model_name,
29
+ )
30
 
31
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
32
  tokenizer.pad_token = tokenizer.eos_token