abhivsh commited on
Commit
d620266
·
verified ·
1 Parent(s): 3600e92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 file_paths:
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 = []