Spaces:
Runtime error
Runtime error
Commit
·
e665513
1
Parent(s):
9bd7561
initial commit
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import time
|
|
10 |
|
11 |
API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
12 |
headers = {"Authorization": f"Bearer {os.environ.get('API_KEY')}"}
|
13 |
-
|
14 |
|
15 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
16 |
# device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
@@ -63,7 +63,7 @@ rag_pipeline = RetrievalQA.from_chain_type(
|
|
63 |
|
64 |
|
65 |
def main(question):
|
66 |
-
return rag_pipeline(question)
|
67 |
# global chatbot
|
68 |
# context = retrieval.predict(question, api_name = "/predict")
|
69 |
# answer=call_llm_api(question,context)
|
|
|
10 |
|
11 |
API_URL = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
|
12 |
headers = {"Authorization": f"Bearer {os.environ.get('API_KEY')}"}
|
13 |
+
retrieval = Client("https://ishaan-mital-ncert-helper-vector-db.hf.space/--replicas/149bl5mjn/")
|
14 |
|
15 |
embed_model_id = 'sentence-transformers/all-MiniLM-L6-v2'
|
16 |
# device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu'
|
|
|
63 |
|
64 |
|
65 |
def main(question):
|
66 |
+
# return rag_pipeline(question)
|
67 |
# global chatbot
|
68 |
# context = retrieval.predict(question, api_name = "/predict")
|
69 |
# answer=call_llm_api(question,context)
|