Writo commited on
Commit
d334770
·
1 Parent(s): bba9240

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -91,10 +91,10 @@ def main():
91
  #text = read_documents_from_directory(train_directory)
92
 
93
  def get_pdf_links_from_dataset(url):
94
- response = requests.get(url)
95
- soup = BeautifulSoup(response.text, 'html.parser')
96
- pdf_links = [link.get('href') for link in soup.find_all('a') if link.get('href').endswith('.pdf')]
97
- return pdf_links
98
 
99
  dataset_url = 'https://huggingface.co/datasets/Writo/realestate_data/tree/main'
100
  pdf_links = get_pdf_links_from_dataset(dataset_url)
 
91
  #text = read_documents_from_directory(train_directory)
92
 
93
  def get_pdf_links_from_dataset(url):
94
+ response = requests.get(url)
95
+ soup = BeautifulSoup(response.text, 'html.parser')
96
+ pdf_links = [link.get('href') for link in soup.find_all('a') if link.get('href').endswith('.pdf')]
97
+ return pdf_links
98
 
99
  dataset_url = 'https://huggingface.co/datasets/Writo/realestate_data/tree/main'
100
  pdf_links = get_pdf_links_from_dataset(dataset_url)