Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ hf_model = "sentence-transformers/all-MiniLM-L6-v2"
|
|
52 |
from huggingface_hub import HfFileSystem
|
53 |
fs = HfFileSystem(token=fs_token)
|
54 |
file_paths = fs.glob("datasets/abhivsh/Model-TS/*.pdf")
|
55 |
-
|
56 |
|
57 |
def chat_query(question):
|
58 |
|
@@ -61,7 +61,7 @@ def chat_query(question):
|
|
61 |
# Loop through PDF Files
|
62 |
loaders = []
|
63 |
|
64 |
-
for file_path in
|
65 |
loaders.append(PyPDFLoader(file_path))
|
66 |
|
67 |
docs = []
|
|
|
52 |
from huggingface_hub import HfFileSystem
|
53 |
fs = HfFileSystem(token=fs_token)
|
54 |
file_paths = fs.glob("datasets/abhivsh/Model-TS/*.pdf")
|
55 |
+
hf_file_paths = ["hf://"+ file_path for file_path in file_paths]
|
56 |
|
57 |
def chat_query(question):
|
58 |
|
|
|
61 |
# Loop through PDF Files
|
62 |
loaders = []
|
63 |
|
64 |
+
for file_path in hf_file_paths:
|
65 |
loaders.append(PyPDFLoader(file_path))
|
66 |
|
67 |
docs = []
|