Kalyani8 commited on
Commit
6535a83
·
verified ·
1 Parent(s): bd7aeef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ import chromadb
9
  import os
10
  import requests
11
 
12
- API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-chat-hf"
13
  headers = {"Authorization": f"Bearer {os.getenv('HF_Token')}"}
14
 
15
  def query_llama(prompt):
@@ -40,7 +40,7 @@ def get_embedding(text):
40
  return outputs.last_hidden_state[:, 0, :].numpy().tolist() # Take CLS token embedding
41
 
42
  # Load LLaMA Model (Meta LLaMA 2)
43
- llama_pipe = pipeline("text-generation", model=AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf"))
44
 
45
  # Load a small subset (10,000 rows)
46
  #dataset = load_dataset("wiki40b", "en", split="train[:1000]")
 
9
  import os
10
  import requests
11
 
12
+ API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-hf"
13
  headers = {"Authorization": f"Bearer {os.getenv('HF_Token')}"}
14
 
15
  def query_llama(prompt):
 
40
  return outputs.last_hidden_state[:, 0, :].numpy().tolist() # Take CLS token embedding
41
 
42
  # Load LLaMA Model (Meta LLaMA 2)
43
+ #llama_pipe = pipeline("text-generation", model=AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat-hf"))
44
 
45
  # Load a small subset (10,000 rows)
46
  #dataset = load_dataset("wiki40b", "en", split="train[:1000]")