ariG23498 HF staff commited on
Commit
20309d7
1 Parent(s): bbd2c0c

chore: fixing secrets

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -6,10 +6,12 @@ from sentence_transformers import SentenceTransformer
6
  from transformers import AutoTokenizer, AutoModelForCausalLM
7
  import os
8
 
 
 
9
  dataset = load_dataset("ariG23498/pis-blogs-chunked")
10
  embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2")
11
- tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it", key="HF_TOKEN", value=os.getenv("auth"))
12
- model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it", torch_dtype=torch.bfloat16, key="HF_TOKEN", value=os.getenv("auth"))
13
 
14
  @spaces.GPU
15
  def process_query(query):
 
6
  from transformers import AutoTokenizer, AutoModelForCausalLM
7
  import os
8
 
9
+ os.environ["HF_TOKEN"] = os.getenv("auth")
10
+
11
  dataset = load_dataset("ariG23498/pis-blogs-chunked")
12
  embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2")
13
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it")
14
+ model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it", torch_dtype=torch.bfloat16)
15
 
16
  @spaces.GPU
17
  def process_query(query):