multimodalart HF staff commited on
Commit
584be3a
1 Parent(s): 730c3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -12
app.py CHANGED
@@ -434,18 +434,13 @@ with gr.Blocks(css=css) as demo:
434
 
435
  with gr.Box(visible=False) as training_summary:
436
  training_summary_text = gr.HTML("", visible=False, label="Training Summary")
437
- if(is_spaces):
438
- training_summary_checkbox = gr.Checkbox(label="Automatically remove paid GPU attribution and upload model to the Hugging Face Hub after training", value=False)
439
- training_summary_model_name = gr.Textbox(label="Name of your model", visible=False)
440
- training_summary_where_to_upload = gr.Dropdown(["My personal profile", "Public Library"], label="Upload to", visible=False)
441
- training_summary_token_message = gr.Markdown("[A Hugging Face write access token](https://huggingface.co/settings/tokens), go to \"New token\" -> Role : Write. A regular read token won't work here.", visible=False)
442
- training_summary_token = gr.Textbox(label="Hugging Face Write Token", type="password", visible=False)
443
- else:
444
- training_summary_checkbox = False
445
- training_summary_model_name = ''
446
- training_summary_where_to_upload = "My person profile"
447
- training_summary_token_message = ""
448
- training_summary_token = ""
449
  train_btn = gr.Button("Start Training")
450
 
451
  training_ongoing = gr.Markdown("## Training is ongoing ⌛... You can close this tab if you like or just wait. If you did not check the `Remove GPU After training`, you can come back here to try your model and upload it after training. Don't forget to remove the GPU attribution after you are done. ", visible=False)
 
434
 
435
  with gr.Box(visible=False) as training_summary:
436
  training_summary_text = gr.HTML("", visible=False, label="Training Summary")
437
+ is_advanced_visible = True if is_spaces else False
438
+ training_summary_checkbox = gr.Checkbox(label="Automatically remove paid GPU attribution and upload model to the Hugging Face Hub after training", value=False, visible=is_advanced_visible)
439
+ training_summary_model_name = gr.Textbox(label="Name of your model", visible=False)
440
+ training_summary_where_to_upload = gr.Dropdown(["My personal profile", "Public Library"], label="Upload to", visible=False)
441
+ training_summary_token_message = gr.Markdown("[A Hugging Face write access token](https://huggingface.co/settings/tokens), go to \"New token\" -> Role : Write. A regular read token won't work here.", visible=False)
442
+ training_summary_token = gr.Textbox(label="Hugging Face Write Token", type="password", visible=False)
443
+
 
 
 
 
 
444
  train_btn = gr.Button("Start Training")
445
 
446
  training_ongoing = gr.Markdown("## Training is ongoing ⌛... You can close this tab if you like or just wait. If you did not check the `Remove GPU After training`, you can come back here to try your model and upload it after training. Don't forget to remove the GPU attribution after you are done. ", visible=False)