Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,12 @@ from langchain_community.llms import CTransformers
|
|
4 |
from langchain.chains import RetrievalQA
|
5 |
import gradio as gr
|
6 |
from huggingface_hub import hf_hub_download
|
7 |
-
import os
|
8 |
|
9 |
DB_FAISS_PATH = "vectorstores/db_faiss"
|
10 |
|
11 |
def load_llm():
|
12 |
-
model_name = 'TheBloke/Llama-2-7B-Chat-GGML' #
|
13 |
-
model_path = hf_hub_download(repo_id=model_name, filename='
|
14 |
llm = CTransformers(
|
15 |
model=model_path,
|
16 |
model_type="llama",
|
@@ -76,3 +75,4 @@ iface = gr.Interface(
|
|
76 |
|
77 |
iface.launch()
|
78 |
|
|
|
|
4 |
from langchain.chains import RetrievalQA
|
5 |
import gradio as gr
|
6 |
from huggingface_hub import hf_hub_download
|
|
|
7 |
|
8 |
DB_FAISS_PATH = "vectorstores/db_faiss"
|
9 |
|
10 |
def load_llm():
|
11 |
+
model_name = 'TheBloke/Llama-2-7B-Chat-GGML' # Correct model repository
|
12 |
+
model_path = hf_hub_download(repo_id=model_name, filename='llama-2-7b-chat.ggmlv3.q8_0.bin', cache_dir='./models')
|
13 |
llm = CTransformers(
|
14 |
model=model_path,
|
15 |
model_type="llama",
|
|
|
75 |
|
76 |
iface.launch()
|
77 |
|
78 |
+
|