Spaces:
Runtime error
Runtime error
ishaan-mital
commited on
Commit
•
9bf2bb2
1
Parent(s):
8f1d664
lets see
Browse files
app.py
CHANGED
@@ -10,7 +10,6 @@ from langchain.llms.huggingface_text_gen_inference import HuggingFaceTextGenInfe
|
|
10 |
from langchain.prompts import PromptTemplate
|
11 |
from langchain.chains import RetrievalQA
|
12 |
|
13 |
-
headers = {"Authorization": f"Bearer {os.environ.get('API_KEY')}"}
|
14 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
15 |
# device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
16 |
|
@@ -56,6 +55,7 @@ vectorstore = Pinecone(
|
|
56 |
|
57 |
|
58 |
API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
|
|
59 |
llm = HuggingFaceTextGenInference(
|
60 |
inference_server_url=API_URL,
|
61 |
max_new_tokens=512,
|
|
|
10 |
from langchain.prompts import PromptTemplate
|
11 |
from langchain.chains import RetrievalQA
|
12 |
|
|
|
13 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
14 |
# device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
15 |
|
|
|
55 |
|
56 |
|
57 |
API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
58 |
+
headers = {"Authorization": f"Bearer {os.environ.get('API_KEY')}"}
|
59 |
llm = HuggingFaceTextGenInference(
|
60 |
inference_server_url=API_URL,
|
61 |
max_new_tokens=512,
|