Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -171,7 +171,7 @@ def clear_directory(directory_path):
|
|
171 |
|
172 |
def get_start_info(b_lora_name):
|
173 |
your_username = api.whoami(token=hf_token)["name"]
|
174 |
-
return f"https://hf.co/{your_username}/{
|
175 |
|
176 |
def main(image_path, b_lora_trained_folder, instance_prompt, training_type, training_steps):
|
177 |
|
@@ -356,9 +356,10 @@ with gr.Blocks(css=css) as demo:
|
|
356 |
with gr.Row():
|
357 |
started_info = gr.Textbox(
|
358 |
label="Training has started",
|
359 |
-
info="You can open this space's logs to monitor logs training; once training is finished, your model will be available here:"
|
|
|
360 |
)
|
361 |
-
status = gr.Textbox(label="status")
|
362 |
|
363 |
current_sleep_time.change(
|
364 |
fn = swap_sleep_time,
|
@@ -381,7 +382,7 @@ with gr.Blocks(css=css) as demo:
|
|
381 |
train_btn.click(
|
382 |
fn = get_start_info,
|
383 |
inputs = [b_lora_name],
|
384 |
-
outputs = [started_info]
|
385 |
).then(
|
386 |
fn = main,
|
387 |
inputs = [image, b_lora_name, instance_prompt, training_type, training_steps],
|
|
|
171 |
|
172 |
def get_start_info(b_lora_name):
|
173 |
your_username = api.whoami(token=hf_token)["name"]
|
174 |
+
return gr.update(visible=True, value=f"https://hf.co/{your_username}/{b_lora_name}"), gr.update(visible=True)
|
175 |
|
176 |
def main(image_path, b_lora_trained_folder, instance_prompt, training_type, training_steps):
|
177 |
|
|
|
356 |
with gr.Row():
|
357 |
started_info = gr.Textbox(
|
358 |
label="Training has started",
|
359 |
+
info="You can open this space's logs to monitor logs training; once training is finished, your model will be available here:",
|
360 |
+
visible=False
|
361 |
)
|
362 |
+
status = gr.Textbox(label="status", visible=False)
|
363 |
|
364 |
current_sleep_time.change(
|
365 |
fn = swap_sleep_time,
|
|
|
382 |
train_btn.click(
|
383 |
fn = get_start_info,
|
384 |
inputs = [b_lora_name],
|
385 |
+
outputs = [started_info, status]
|
386 |
).then(
|
387 |
fn = main,
|
388 |
inputs = [image, b_lora_name, instance_prompt, training_type, training_steps],
|