adbcode commited on
Commit
aca0b0a
1 Parent(s): c0d0377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -4,7 +4,6 @@ import pymongo
4
  import spaces
5
 
6
 
7
- from huggingface_hub import login
8
  from sentence_transformers import SentenceTransformer
9
  from transformers import AutoTokenizer, AutoModelForCausalLM
10
 
@@ -107,7 +106,6 @@ def process_response(message, history):
107
 
108
  if __name__ == "__main__":
109
 
110
- # https://huggingface.co/thenlper/gte-large
111
  embedding_model = SentenceTransformer("thenlper/gte-large")
112
 
113
  mongo_uri = os.getenv("MONGO_URI")
@@ -120,8 +118,6 @@ if __name__ == "__main__":
120
  db = mongo_client["recipe"]
121
  collection = db["recipe_collection"]
122
 
123
- # login(token=os.getenv("HF_TOKEN"))
124
-
125
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it")
126
  model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it", device_map="auto")
127
 
 
4
  import spaces
5
 
6
 
 
7
  from sentence_transformers import SentenceTransformer
8
  from transformers import AutoTokenizer, AutoModelForCausalLM
9
 
 
106
 
107
  if __name__ == "__main__":
108
 
 
109
  embedding_model = SentenceTransformer("thenlper/gte-large")
110
 
111
  mongo_uri = os.getenv("MONGO_URI")
 
118
  db = mongo_client["recipe"]
119
  collection = db["recipe_collection"]
120
 
 
 
121
  tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it")
122
  model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it", device_map="auto")
123