umair007 commited on
Commit
0c388d4
1 Parent(s): 0a7c45e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -196,7 +196,7 @@ def delete_ckpt():
196
  os.system(f"rm -rf ckpt")
197
  return "delete ckpt done!"
198
 
199
- def download_ckpt(ckpt_url_2, ckpt_name_2):
200
  # Create the ckpt directory if it doesn't exist
201
  os.makedirs("ckpt", exist_ok=True)
202
 
@@ -480,11 +480,11 @@ with block:
480
  text_safetensors_token = gr.Textbox(show_label=False, max_lines=1, placeholder="🤗 token")
481
  out_safetensors = gr.Textbox(show_label=False)
482
  with gr.Row().style(equal_height=True):
483
- btn_download_ckpt = gr.Button("Download CKPT")
484
  btn_to_safetensors = gr.Button("Convert to Safetensors")
485
  btn_push_safetensors = gr.Button("Push Safetensors to 🤗")
486
  btn_delete_safetensors = gr.Button("Delete Safetensors")
487
- btn_download_ckpt.click(download_ckpt, inputs=[text_ckpt_url_2, text_ckpt_name_2], outputs=out_safetensors)
488
  btn_to_safetensors.click(to_safetensors, inputs=[text_ckpt_name_2, text_safetensors_name_2], outputs=out_safetensors)
489
  btn_push_safetensors.click(push_safetensors, inputs=[text_safetensors_model_to, text_safetensors_token, text_safetensors_branch], outputs=out_safetensors)
490
  btn_delete_safetensors.click(delete_safetensors, outputs=out_safetensors)
 
196
  os.system(f"rm -rf ckpt")
197
  return "delete ckpt done!"
198
 
199
+ def download_ckpt_1(ckpt_url_2, ckpt_name_2):
200
  # Create the ckpt directory if it doesn't exist
201
  os.makedirs("ckpt", exist_ok=True)
202
 
 
480
  text_safetensors_token = gr.Textbox(show_label=False, max_lines=1, placeholder="🤗 token")
481
  out_safetensors = gr.Textbox(show_label=False)
482
  with gr.Row().style(equal_height=True):
483
+ btn_download_ckpt_1 = gr.Button("Download CKPT")
484
  btn_to_safetensors = gr.Button("Convert to Safetensors")
485
  btn_push_safetensors = gr.Button("Push Safetensors to 🤗")
486
  btn_delete_safetensors = gr.Button("Delete Safetensors")
487
+ btn_download_ckpt_1.click(download_ckpt_1, inputs=[text_ckpt_url_2, text_ckpt_name_2], outputs=out_safetensors)
488
  btn_to_safetensors.click(to_safetensors, inputs=[text_ckpt_name_2, text_safetensors_name_2], outputs=out_safetensors)
489
  btn_push_safetensors.click(push_safetensors, inputs=[text_safetensors_model_to, text_safetensors_token, text_safetensors_branch], outputs=out_safetensors)
490
  btn_delete_safetensors.click(delete_safetensors, outputs=out_safetensors)