multimodalart HF staff commited on
Commit
f293b4b
1 Parent(s): 81d119a

Update app_training.py

Browse files
Files changed (1) hide show
  1. app_training.py +30 -13
app_training.py CHANGED
@@ -27,18 +27,6 @@ def create_training_demo(trainer: Trainer,
27
  gr.Markdown('''
28
  - Upload a video and write a prompt that describes the video.
29
  ''')
30
- with gr.Box():
31
- gr.Markdown('Output Model')
32
- output_model_name = gr.Text(label='Name of your model',
33
- placeholder='The surfer man',
34
- max_lines=1)
35
- delete_existing_model = gr.Checkbox(
36
- label='Delete existing model of the same name',
37
- value=False)
38
- validation_prompt = gr.Text(label='Validation Prompt', placeholder='a dog is surfing')
39
- gr.Markdown('''
40
- - The validation prompt should modify your `Training Prompt` in order to validate the model
41
- ''')
42
 
43
  with gr.Column():
44
  with gr.Box():
@@ -100,13 +88,42 @@ def create_training_demo(trainer: Trainer,
100
  - 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})).
101
  - You can also choose "Personal Profile", in which case, the model will be uploaded to https://huggingface.co/{{your_username}}/{{model_name}}.
102
  ''')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  remove_gpu_after_training = gr.Checkbox(
104
  label='Remove GPU after training',
105
  value=False,
106
  interactive=bool(os.getenv('SPACE_ID')),
107
  visible=False)
108
  run_button = gr.Button('Start Training')
109
-
110
  with gr.Box():
111
  gr.Markdown('Output message')
112
  output_message = gr.Markdown()
 
27
  gr.Markdown('''
28
  - Upload a video and write a prompt that describes the video.
29
  ''')
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  with gr.Column():
32
  with gr.Box():
 
88
  - 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})).
89
  - You can also choose "Personal Profile", in which case, the model will be uploaded to https://huggingface.co/{{your_username}}/{{model_name}}.
90
  ''')
91
+ with gr.Box():
92
+ gr.Markdown('Output Model')
93
+ output_model_name = gr.Text(label='Name of your model',
94
+ placeholder='The surfer man',
95
+ max_lines=1)
96
+ delete_existing_model = gr.Checkbox(
97
+ label='Delete existing model of the same name',
98
+ value=False)
99
+ validation_prompt = gr.Text(label='Validation Prompt', placeholder='a dog is surfing')
100
+ gr.Markdown('''
101
+ - The validation prompt should modify your `Training Prompt` in order to validate the model
102
+ ''')
103
+ gr.Markdown('Upload Settings')
104
+ with gr.Row():
105
+ upload_to_hub = gr.Checkbox(
106
+ label='Upload model to Hub', value=True)
107
+ use_private_repo = gr.Checkbox(label='Private',
108
+ value=True)
109
+ delete_existing_repo = gr.Checkbox(
110
+ label='Delete existing repo of the same name',
111
+ value=False)
112
+ upload_to = gr.Radio(
113
+ label='Upload to',
114
+ choices=[_.value for _ in UploadTarget],
115
+ value=UploadTarget.MODEL_LIBRARY.value)
116
+ gr.Markdown(f'''
117
+ - 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})).
118
+ - You can also choose "Personal Profile", in which case, the model will be uploaded to https://huggingface.co/{{your_username}}/{{model_name}}.
119
+ ''')
120
  remove_gpu_after_training = gr.Checkbox(
121
  label='Remove GPU after training',
122
  value=False,
123
  interactive=bool(os.getenv('SPACE_ID')),
124
  visible=False)
125
  run_button = gr.Button('Start Training')
126
+
127
  with gr.Box():
128
  gr.Markdown('Output message')
129
  output_message = gr.Markdown()