Commit
·
da2cb89
1
Parent(s):
e59f7f6
token
Browse files
app.py
CHANGED
@@ -61,16 +61,17 @@ def process_pdfs(pdf_files, sample_size, hf_repo, oauth_token: gr.OAuthToken | N
|
|
61 |
|
62 |
if hf_repo:
|
63 |
try:
|
64 |
-
|
65 |
-
api.create_repo(
|
66 |
hf_repo,
|
67 |
repo_type="dataset",
|
|
|
68 |
)
|
69 |
-
|
70 |
folder_path=images_dir,
|
71 |
repo_id=hf_repo,
|
72 |
repo_type="dataset",
|
73 |
path_in_repo="images",
|
|
|
74 |
)
|
75 |
message += (
|
76 |
f"\nUploaded images to Hugging Face repo: {hf_repo}/images"
|
|
|
61 |
|
62 |
if hf_repo:
|
63 |
try:
|
64 |
+
create_repo(
|
|
|
65 |
hf_repo,
|
66 |
repo_type="dataset",
|
67 |
+
token=oauth_token.token,
|
68 |
)
|
69 |
+
upload_folder(
|
70 |
folder_path=images_dir,
|
71 |
repo_id=hf_repo,
|
72 |
repo_type="dataset",
|
73 |
path_in_repo="images",
|
74 |
+
token=oauth_token.token,
|
75 |
)
|
76 |
message += (
|
77 |
f"\nUploaded images to Hugging Face repo: {hf_repo}/images"
|