Wtzwho commited on
Commit
28b4b1c
1 Parent(s): cd21998

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -7,11 +7,15 @@ model_name = "AIFS/Prometh-MOEM-V.01"
7
 
8
  HF_TOKEN = os.environ.get("HF_TOKEN")
9
 
10
- tokenizer = AutoTokenizer.from_pretrained(model_name)
 
 
11
  text_generation_pipeline = pipeline(
12
  "text-generation",
13
  model=model_name,
14
  model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
 
 
15
  )
16
 
17
  def generate_text(user_input):
 
7
 
8
  HF_TOKEN = os.environ.get("HF_TOKEN")
9
 
10
+
11
+ tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=HF_TOKEN)
12
+
13
  text_generation_pipeline = pipeline(
14
  "text-generation",
15
  model=model_name,
16
  model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
17
+ use_auth_token=hf_token
18
+ )
19
  )
20
 
21
  def generate_text(user_input):