multimodalart HF staff commited on
Commit
890c99b
1 Parent(s): cfadc6d

Update app_training.py

Browse files
Files changed (1) hide show
  1. app_training.py +20 -20
app_training.py CHANGED
@@ -36,24 +36,6 @@ def create_training_demo(trainer: Trainer,
36
  value=False,
37
  visible=False)
38
  validation_prompt = gr.Text(label='Validation Prompt')
39
- with gr.Box():
40
- gr.Markdown('Upload Settings')
41
- with gr.Row():
42
- upload_to_hub = gr.Checkbox(
43
- label='Upload model to Hub', value=True)
44
- use_private_repo = gr.Checkbox(label='Private',
45
- value=True)
46
- delete_existing_repo = gr.Checkbox(
47
- label='Delete existing repo of the same name',
48
- value=False)
49
- upload_to = gr.Radio(
50
- label='Upload to',
51
- choices=[_.value for _ in UploadTarget],
52
- value=UploadTarget.MODEL_LIBRARY.value)
53
- gr.Markdown(f'''
54
- - By default, trained models will be uploaded to [Tune-A-Video Library](https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}) (see [this example model](https://huggingface.co/{SAMPLE_MODEL_REPO})).
55
- - You can also choose "Personal Profile", in which case, the model will be uploaded to https://huggingface.co/{{your_username}}/{{model_name}}.
56
- ''')
57
 
58
  with gr.Box():
59
  gr.Markdown('Training Parameters')
@@ -66,7 +48,7 @@ def create_training_demo(trainer: Trainer,
66
  label='Resolution',
67
  visible=False)
68
 
69
- token = gr.Text(label="Hugging Face Write Token", placeholder="", visible=True if hf_token else False)
70
  with gr.Accordion("Advanced settings", open=False):
71
  num_training_steps = gr.Number(
72
  label='Number of Training Steps', value=300, precision=0)
@@ -98,7 +80,25 @@ def create_training_demo(trainer: Trainer,
98
  - You may want to try a small number of steps first, like 1, to see if everything works fine in your environment.
99
  - You can check the training status by pressing the "Open logs" button if you are running this on your Space.
100
  ''')
101
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  remove_gpu_after_training = gr.Checkbox(
103
  label='Remove GPU after training',
104
  value=False,
 
36
  value=False,
37
  visible=False)
38
  validation_prompt = gr.Text(label='Validation Prompt')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  with gr.Box():
41
  gr.Markdown('Training Parameters')
 
48
  label='Resolution',
49
  visible=False)
50
 
51
+ token = gr.Text(label="Hugging Face Write Token", placeholder="", visible=False if hf_token else True)
52
  with gr.Accordion("Advanced settings", open=False):
53
  num_training_steps = gr.Number(
54
  label='Number of Training Steps', value=300, precision=0)
 
80
  - You may want to try a small number of steps first, like 1, to see if everything works fine in your environment.
81
  - You can check the training status by pressing the "Open logs" button if you are running this on your Space.
82
  ''')
83
+
84
+ with gr.Box():
85
+ gr.Markdown('Upload Settings')
86
+ with gr.Row():
87
+ upload_to_hub = gr.Checkbox(
88
+ label='Upload model to Hub', value=True)
89
+ use_private_repo = gr.Checkbox(label='Private',
90
+ value=True)
91
+ delete_existing_repo = gr.Checkbox(
92
+ label='Delete existing repo of the same name',
93
+ value=False)
94
+ upload_to = gr.Radio(
95
+ label='Upload to',
96
+ choices=[_.value for _ in UploadTarget],
97
+ value=UploadTarget.MODEL_LIBRARY.value)
98
+ gr.Markdown(f'''
99
+ - By default, trained models will be uploaded to [Tune-A-Video Library](https://huggingface.co/{MODEL_LIBRARY_ORG_NAME}) (see [this example model](https://huggingface.co/{SAMPLE_MODEL_REPO})).
100
+ - You can also choose "Personal Profile", in which case, the model will be uploaded to https://huggingface.co/{{your_username}}/{{model_name}}.
101
+ ''')
102
  remove_gpu_after_training = gr.Checkbox(
103
  label='Remove GPU after training',
104
  value=False,