ysharma HF staff commited on
Commit
e7da559
·
1 Parent(s): 86dbb58

update layout

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -66,16 +66,22 @@ with gr.Blocks() as demo:
66
  in_images = gr.File(label="Upload images to fine-tune for LORA", file_count="multiple")
67
  with gr.Column():
68
  b1 = gr.Button(value="Train LORA model")
69
- with gr.Accordion("Advance settings"):
70
- gr.Markdown("Advance settings for a number of Training Steps and Alpha. Set alpha to 1.0 to fully add LORA. If the LORA seems to have too much effect (i.e., overfitting), set alpha to a lower value. If the LORA seems to have too little effect, set the alpha higher. You can tune these two values to your needs.")
71
- in_steps = gr.Number(label="Enter the number of training steps", value = 4000)
72
- in_alpha = gr.Slider(0.1,1.0, step=0.01, label="Set Alpha level", value=0.5)
73
- with gr.Row():
74
- with gr.Column():
75
  in_prompt = gr.Textbox(label="Enter a prompt for fine-tuned LORA model", visible=True)
76
  b2 = gr.Button(value="Inference using LORA model")
 
 
 
 
 
 
 
 
77
  out_image = gr.Image(label="Image generated by LORA model")
78
  out_file = gr.File(label="Lora trained model weights", )
 
 
 
 
79
 
80
  b1.click(fn = accelerate_train_lora, inputs=in_steps, outputs=out_file)
81
  b2.click(fn = monkeypatching, inputs=[in_alpha, in_prompt], outputs=out_image)
 
66
  in_images = gr.File(label="Upload images to fine-tune for LORA", file_count="multiple")
67
  with gr.Column():
68
  b1 = gr.Button(value="Train LORA model")
 
 
 
 
 
 
69
  in_prompt = gr.Textbox(label="Enter a prompt for fine-tuned LORA model", visible=True)
70
  b2 = gr.Button(value="Inference using LORA model")
71
+ #with gr.Accordion("Advance settings", open=False):
72
+ # gr.Markdown("Advance settings for a number of Training Steps and Alpha. Set alpha to 1.0 to fully add LORA. If the LORA seems to have too much effect (i.e., overfitting), set alpha to a lower value. If the LORA seems to have too little effect, set the alpha higher. You can tune these two values to your needs.")
73
+ # in_steps = gr.Number(label="Enter the number of training steps", value = 4000)
74
+ # in_alpha = gr.Slider(0.1,1.0, step=0.01, label="Set Alpha level", value=0.5)
75
+ with gr.Row():
76
+ #with gr.Column():
77
+ #in_prompt = gr.Textbox(label="Enter a prompt for fine-tuned LORA model", visible=True)
78
+ #b2 = gr.Button(value="Inference using LORA model")
79
  out_image = gr.Image(label="Image generated by LORA model")
80
  out_file = gr.File(label="Lora trained model weights", )
81
+ with gr.Accordion("Advance settings", open=False):
82
+ gr.Markdown("Advance settings for a number of Training Steps and Alpha. Set alpha to 1.0 to fully add LORA. If the LORA seems to have too much effect (i.e., overfitting), set alpha to a lower value. If the LORA seems to have too little effect, set the alpha higher. You can tune these two values to your needs.")
83
+ in_steps = gr.Number(label="Enter the number of training steps", value = 4000)
84
+ in_alpha = gr.Slider(0.1,1.0, step=0.01, label="Set Alpha level", value=0.5)
85
 
86
  b1.click(fn = accelerate_train_lora, inputs=in_steps, outputs=out_file)
87
  b2.click(fn = monkeypatching, inputs=[in_alpha, in_prompt], outputs=out_image)