Anne31415 commited on
Commit
44c0e78
·
1 Parent(s): 36c54d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import streamlit.components.v1 as components
3
  from datasets import load_dataset
4
  import random
@@ -18,6 +19,19 @@ from my_component import my_component
18
 
19
  nltk.download('punkt')
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
 
23
  # Sidebar contents
 
1
  import os
2
+ from huggingface_hub import Repository
3
  import streamlit.components.v1 as components
4
  from datasets import load_dataset
5
  import random
 
19
 
20
  nltk.download('punkt')
21
 
22
+ # Step 1: Clone the Dataset Repository
23
+ repo = Repository(
24
+ local_dir="Private_Book", # Local directory to clone the repository
25
+ repo_type="dataset", # Specify that this is a dataset repository
26
+
27
+ clone_from="Anne31415/Private_Book", # Replace with your repository URL
28
+
29
+ token=os.os.getenv["HUB_TOKEN"] # Use the secret token to authenticate
30
+ )
31
+ repo.git_pull() # Pull the latest changes (if any)
32
+
33
+ # Step 2: Load the PDF File
34
+ pdf_file_path = "Private_Book/Glossar_PDF_webscraping.pdf" # Replace with your PDF file path
35
 
36
 
37
  # Sidebar contents