Androidonnxfork commited on
Commit
e604382
1 Parent(s): f660de1

Update app1.py

Browse files
Files changed (1) hide show
  1. app1.py +3 -3
app1.py CHANGED
@@ -6,7 +6,7 @@ from huggingface_hub import HfApi, create_repo
6
 
7
 
8
 
9
- def convert_checkpoint(url, name,repo_id, hf_token ,visibility ,image_size, scheduler_type, use_half):
10
  try:
11
 
12
  print("Downloading")
@@ -49,7 +49,7 @@ def convert_checkpoint(url, name,repo_id, hf_token ,visibility ,image_size, sche
49
 
50
  # Create a repository
51
  api = HfApi()
52
- api.create_repo(f"{repo_id}/{name}",private=visibility == "True")
53
 
54
  # Upload a folder to the repository
55
  api.upload_folder(
@@ -73,7 +73,7 @@ iface = gr.Interface(
73
  gr.inputs.Textbox(label="URL"),
74
  gr.inputs.Textbox(label="Name"),
75
  gr.inputs.Textbox(label="Repo id"),
76
- gr.inputs.Dropdown(label="Visibility", choices=["True","False"]),
77
  gr.inputs.Textbox(label="Hugging Face API Token"),
78
  gr.inputs.Radio(label="Image Size", choices=["512", "768"]),
79
  gr.inputs.Dropdown(label="Scheduler Type", choices=['pndm', 'lms', 'ddim', 'euler', 'euler-ancestral', 'dpm']),
 
6
 
7
 
8
 
9
+ def convert_checkpoint(url, name,repo_id, hf_token ,image_size, scheduler_type, use_half):
10
  try:
11
 
12
  print("Downloading")
 
49
 
50
  # Create a repository
51
  api = HfApi()
52
+ api.create_repo(f"{repo_id}/{name}")
53
 
54
  # Upload a folder to the repository
55
  api.upload_folder(
 
73
  gr.inputs.Textbox(label="URL"),
74
  gr.inputs.Textbox(label="Name"),
75
  gr.inputs.Textbox(label="Repo id"),
76
+ # gr.inputs.Dropdown(label="Visibility", choices=["True","False"]),
77
  gr.inputs.Textbox(label="Hugging Face API Token"),
78
  gr.inputs.Radio(label="Image Size", choices=["512", "768"]),
79
  gr.inputs.Dropdown(label="Scheduler Type", choices=['pndm', 'lms', 'ddim', 'euler', 'euler-ancestral', 'dpm']),