multimodalart HF staff commited on
Commit
868b6a5
1 Parent(s): b71d32f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -51,7 +51,11 @@ def swap_text(option, base):
51
  instance_prompt_example = "julcto"
52
  freeze_for = 70
53
  show_prior_preservation = True if base != "v2-768" else False
54
- return [f"You are going to train a `person`(s), upload 10-20 images of each person you are planning on training on from different angles/perspectives. You can use services like <a style='text-decoration: underline' target='_blank' href='https://www.birme.net/?target_width={resize_width}&target_height={resize_width}'>birme</a> for smart cropping. {mandatory_liability}:", '''<img src="file/person.png" />''', f"You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `{instance_prompt_example}` here). Images will be automatically cropped to {resize_width}x{resize_width}.", freeze_for, gr.update(visible=show_prior_preservation)]
 
 
 
 
55
  elif(option == "style"):
56
  instance_prompt_example = "trsldamrl"
57
  freeze_for = 10
 
51
  instance_prompt_example = "julcto"
52
  freeze_for = 70
53
  show_prior_preservation = True if base != "v2-768" else False
54
+ if(show_prior_preservation):
55
+ prior_preservation_box_update = gr.update(visible=show_prior_preservation)
56
+ else:
57
+ prior_preservation_box_update = gr.update(visible=show_prior_preservation, value=False)
58
+ return [f"You are going to train a `person`(s), upload 10-20 images of each person you are planning on training on from different angles/perspectives. You can use services like <a style='text-decoration: underline' target='_blank' href='https://www.birme.net/?target_width={resize_width}&target_height={resize_width}'>birme</a> for smart cropping. {mandatory_liability}:", '''<img src="file/person.png" />''', f"You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `{instance_prompt_example}` here). Images will be automatically cropped to {resize_width}x{resize_width}.", freeze_for, prior_preservation_box_update]
59
  elif(option == "style"):
60
  instance_prompt_example = "trsldamrl"
61
  freeze_for = 10