Commit
·
541dace
1
Parent(s):
7fcf86a
Add Optional parameter to hf_token in
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from functools import lru_cache
|
|
6 |
import gradio as gr
|
7 |
from git import Repo
|
8 |
from httpx import Client
|
|
|
9 |
from huggingface_hub import create_repo, upload_folder
|
10 |
from toolz import groupby
|
11 |
|
@@ -25,7 +26,7 @@ clone_into_temp_dir("https://github.com/chen-zichen/XplainLLM_dataset/")
|
|
25 |
def upload_directory_to_hf(
|
26 |
repo_id: str,
|
27 |
directory: str,
|
28 |
-
hf_token: gr.OAuthToken,
|
29 |
private: bool = False,
|
30 |
):
|
31 |
url = create_repo(
|
|
|
6 |
import gradio as gr
|
7 |
from git import Repo
|
8 |
from httpx import Client
|
9 |
+
from typing import Optional
|
10 |
from huggingface_hub import create_repo, upload_folder
|
11 |
from toolz import groupby
|
12 |
|
|
|
26 |
def upload_directory_to_hf(
|
27 |
repo_id: str,
|
28 |
directory: str,
|
29 |
+
hf_token: Optional[gr.OAuthToken] = None,
|
30 |
private: bool = False,
|
31 |
):
|
32 |
url = create_repo(
|