rishisim commited on
Commit
ebf08b8
·
verified ·
1 Parent(s): b361cc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -14,19 +14,25 @@ import os
14
  # from transformers import AutoModelForCausalLM, AutoTokenizer
15
  # from transformers import pipeline
16
 
 
 
 
 
17
  # hf_token = os.environ['llama_token']
18
 
19
  # login(token=hf_token)
20
 
21
  # llm = pipeline("text-generation", model="meta-llama/Meta-Llama-3-8B-Instruct")
22
-
23
  # llm = pipeline("text-generation", model = "meta-llama/Meta-Llama-3-70B-Instruct")
24
 
 
25
  # llm = pipeline("text-generation", model="mistralai/Mixtral-8x22B-Instruct-v0.1")
26
 
27
- api_key = "AIzaSyCdM_aAIsW_nPbjarOF83mbX1_z1cVX2_M"
28
 
29
- llm = GoogleGenerativeAI(model="models/text-bison-001", google_api_key=api_key)
 
 
 
30
  # llm = GooglePalm(google_api_key = api_key, temperature=0.7)
31
 
32
  # LOADING CSV FILE
 
14
  # from transformers import AutoModelForCausalLM, AutoTokenizer
15
  # from transformers import pipeline
16
 
17
+ from transformers import AutoModel
18
+ llm = AutoModel.from_pretrained("Alibaba-NLP/gte-large-en-v1.5", trust_remote_code=True)
19
+
20
+ # LLAMA
21
  # hf_token = os.environ['llama_token']
22
 
23
  # login(token=hf_token)
24
 
25
  # llm = pipeline("text-generation", model="meta-llama/Meta-Llama-3-8B-Instruct")
 
26
  # llm = pipeline("text-generation", model = "meta-llama/Meta-Llama-3-70B-Instruct")
27
 
28
+ # MISTRAL
29
  # llm = pipeline("text-generation", model="mistralai/Mixtral-8x22B-Instruct-v0.1")
30
 
 
31
 
32
+ # TO USE GOOGLE MODELS
33
+ # api_key = "AIzaSyCdM_aAIsW_nPbjarOF83mbX1_z1cVX2_M"
34
+
35
+ # llm = GoogleGenerativeAI(model="models/text-bison-001", google_api_key=api_key)
36
  # llm = GooglePalm(google_api_key = api_key, temperature=0.7)
37
 
38
  # LOADING CSV FILE