chore: fixing secrets
Browse files
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"
|
12 |
-
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it", torch_dtype=torch.bfloat16
|
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):
|