Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -268,20 +268,23 @@ with gr.Blocks(css=css) as demo:
|
|
268 |
</p>
|
269 |
</div>
|
270 |
''')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
else:
|
272 |
-
training_type = gr.Radio(label="Training type", choices=["style", "concept"], value="style")
|
273 |
-
b_lora_name = gr.Textbox(label="Name your B-LoRa model", placeholder="b_lora_trained_folder")
|
274 |
with gr.Row():
|
275 |
-
instance_prompt = gr.Textbox(label="Create instance prompt", placeholder="A [v42] <class_prompt>")
|
276 |
-
class_prompt = gr.Textbox(label="Specify class prompt", placeholder="style | person | dog ")
|
277 |
training_steps = gr.Number(label="Training steps", value=1000, interactive=False)
|
278 |
checkpoint_step = gr.Number(label="checkpoint step", visible=False, value=500)
|
279 |
|
280 |
-
|
281 |
-
fn = change_training_setup,
|
282 |
-
inputs = [training_type],
|
283 |
-
outputs = [training_steps, checkpoint_step]
|
284 |
-
)
|
285 |
if sleep_time > 1:
|
286 |
train_btn = gr.Button("Train B-LoRa", visible=False)
|
287 |
else:
|
@@ -289,6 +292,11 @@ with gr.Blocks(css=css) as demo:
|
|
289 |
status = gr.Textbox(label="status")
|
290 |
|
291 |
|
|
|
|
|
|
|
|
|
|
|
292 |
|
293 |
train_btn.click(
|
294 |
fn = main,
|
|
|
268 |
</p>
|
269 |
</div>
|
270 |
''')
|
271 |
+
training_type = gr.Radio(label="Training type", choices=["style", "concept"], value="style", interactive=False)
|
272 |
+
b_lora_name = gr.Textbox(label="Name your B-LoRa model", placeholder="b_lora_trained_folder", interactive=False)
|
273 |
+
with gr.Row():
|
274 |
+
instance_prompt = gr.Textbox(label="Create instance prompt", placeholder="A [v42] <class_prompt>", interactive=False)
|
275 |
+
class_prompt = gr.Textbox(label="Specify class prompt", placeholder="style | person | dog ", interactive=False)
|
276 |
+
training_steps = gr.Number(label="Training steps", value=1000, interactive=False)
|
277 |
+
checkpoint_step = gr.Number(label="checkpoint step", visible=False, value=500)
|
278 |
else:
|
279 |
+
training_type = gr.Radio(label="Training type", choices=["style", "concept"], value="style", interactive=True)
|
280 |
+
b_lora_name = gr.Textbox(label="Name your B-LoRa model", placeholder="b_lora_trained_folder", interactive=True)
|
281 |
with gr.Row():
|
282 |
+
instance_prompt = gr.Textbox(label="Create instance prompt", placeholder="A [v42] <class_prompt>", interactive=True)
|
283 |
+
class_prompt = gr.Textbox(label="Specify class prompt", placeholder="style | person | dog ", interactive=True)
|
284 |
training_steps = gr.Number(label="Training steps", value=1000, interactive=False)
|
285 |
checkpoint_step = gr.Number(label="checkpoint step", visible=False, value=500)
|
286 |
|
287 |
+
|
|
|
|
|
|
|
|
|
288 |
if sleep_time > 1:
|
289 |
train_btn = gr.Button("Train B-LoRa", visible=False)
|
290 |
else:
|
|
|
292 |
status = gr.Textbox(label="status")
|
293 |
|
294 |
|
295 |
+
training_type.change(
|
296 |
+
fn = change_training_setup,
|
297 |
+
inputs = [training_type],
|
298 |
+
outputs = [training_steps, checkpoint_step]
|
299 |
+
)
|
300 |
|
301 |
train_btn.click(
|
302 |
fn = main,
|