Commit
·
47fa9d4
1
Parent(s):
d7e4f6c
Refactor upload_directory_to_hf function
Browse files
app.py
CHANGED
|
@@ -26,7 +26,6 @@ clone_into_temp_dir("https://github.com/chen-zichen/XplainLLM_dataset/")
|
|
| 26 |
def upload_directory_to_hf(
|
| 27 |
repo_id: str,
|
| 28 |
directory: str,
|
| 29 |
-
hf_token: str,
|
| 30 |
oauth_token: gr.OAuthToken | None = None,
|
| 31 |
):
|
| 32 |
private = False
|
|
@@ -43,7 +42,7 @@ def upload_directory_to_hf(
|
|
| 43 |
path_in_repo="data",
|
| 44 |
repo_id=repo_id,
|
| 45 |
repo_type="dataset",
|
| 46 |
-
token=
|
| 47 |
commit_message="Migrated from GitHub",
|
| 48 |
ignore_patterns=[
|
| 49 |
"*.git*",
|
|
|
|
| 26 |
def upload_directory_to_hf(
|
| 27 |
repo_id: str,
|
| 28 |
directory: str,
|
|
|
|
| 29 |
oauth_token: gr.OAuthToken | None = None,
|
| 30 |
):
|
| 31 |
private = False
|
|
|
|
| 42 |
path_in_repo="data",
|
| 43 |
repo_id=repo_id,
|
| 44 |
repo_type="dataset",
|
| 45 |
+
token=oauth_token.token,
|
| 46 |
commit_message="Migrated from GitHub",
|
| 47 |
ignore_patterns=[
|
| 48 |
"*.git*",
|