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

Update app_training.py

Browse files
Files changed (1) hide show
  1. app_training.py +27 -48
app_training.py CHANGED
@@ -24,8 +24,10 @@ def create_training_demo(trainer: Trainer,
24
  label='Training prompt',
25
  max_lines=1,
26
  placeholder='A man is surfing')
 
27
  gr.Markdown('''
28
- - Upload a video and write a prompt that describes the video.
 
29
  ''')
30
 
31
  with gr.Column():
@@ -69,54 +71,31 @@ def create_training_demo(trainer: Trainer,
69
  - Expected time to train a model for 300 steps: ~20 minutes with T4
70
  - You can check the training status by pressing the "Open logs" button if you are running this on your Space.
71
  ''')
72
-
73
- with gr.Box():
74
- gr.Markdown('Upload Settings')
75
- with gr.Row():
76
- upload_to_hub = gr.Checkbox(
77
- label='Upload model to Hub', value=True)
78
- use_private_repo = gr.Checkbox(label='Private',
79
- value=True)
80
- delete_existing_repo = gr.Checkbox(
81
- label='Delete existing repo of the same name',
82
- value=False)
83
- upload_to = gr.Radio(
84
- label='Upload to',
85
- choices=[_.value for _ in UploadTarget],
86
- value=UploadTarget.MODEL_LIBRARY.value)
87
- gr.Markdown(f'''
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,
 
24
  label='Training prompt',
25
  max_lines=1,
26
  placeholder='A man is surfing')
27
+ validation_prompt = gr.Text(label='Validation Prompt', placeholder='a dog is surfing')
28
  gr.Markdown('''
29
+ - Upload a video and write a `Training Prompt` that describes the video.
30
+ - The validation prompt should modify your `Training Prompt` in order to validate the model
31
  ''')
32
 
33
  with gr.Column():
 
71
  - Expected time to train a model for 300 steps: ~20 minutes with T4
72
  - You can check the training status by pressing the "Open logs" button if you are running this on your Space.
73
  ''')
74
+
75
+ with gr.Row():
76
+ with gr.Column():
77
+ gr.Markdown('Output Model')
78
+ output_model_name = gr.Text(label='Name of your model',
79
+ placeholder='The surfer man',
80
+ max_lines=1)
81
+ delete_existing_model = gr.Checkbox(
82
+ label='Delete existing model of the same name',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  value=False)
84
+ with gr.Column():
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
+
99
  remove_gpu_after_training = gr.Checkbox(
100
  label='Remove GPU after training',
101
  value=False,