Spaces:
Running
Running
Commit
•
9c37b2f
1
Parent(s):
a534aaf
Update app_upload.py
Browse files- app_upload.py +2 -0
app_upload.py
CHANGED
@@ -71,6 +71,7 @@ def create_upload_demo(hf_token: str | None) -> gr.Blocks:
|
|
71 |
choices=[_.value for _ in UploadTarget],
|
72 |
value=UploadTarget.MODEL_LIBRARY.value)
|
73 |
model_name = gr.Textbox(label='Model Name')
|
|
|
74 |
upload_button = gr.Button('Upload')
|
75 |
gr.Markdown(f'''
|
76 |
- You can upload your trained model to your personal profile (i.e. https://huggingface.co/{{your_username}}/{{model_name}}) or to the public [Tune-A-Video Library](https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}) (i.e. https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}/{{model_name}}).
|
@@ -89,6 +90,7 @@ def create_upload_demo(hf_token: str | None) -> gr.Blocks:
|
|
89 |
upload_to,
|
90 |
use_private_repo,
|
91 |
delete_existing_repo,
|
|
|
92 |
],
|
93 |
outputs=output_message)
|
94 |
|
|
|
71 |
choices=[_.value for _ in UploadTarget],
|
72 |
value=UploadTarget.MODEL_LIBRARY.value)
|
73 |
model_name = gr.Textbox(label='Model Name')
|
74 |
+
token = gr.Text(label="Hugging Face Write Token", placeholder="", visible=False if hf_token else True)
|
75 |
upload_button = gr.Button('Upload')
|
76 |
gr.Markdown(f'''
|
77 |
- You can upload your trained model to your personal profile (i.e. https://huggingface.co/{{your_username}}/{{model_name}}) or to the public [Tune-A-Video Library](https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}) (i.e. https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}/{{model_name}}).
|
|
|
90 |
upload_to,
|
91 |
use_private_repo,
|
92 |
delete_existing_repo,
|
93 |
+
token,
|
94 |
],
|
95 |
outputs=output_message)
|
96 |
|