AlekseyCalvin commited on
Commit
7c1444c
1 Parent(s): e26bfcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -63,9 +63,10 @@ class calculateDuration:
63
 
64
  def update_selection(evt: gr.SelectData, width, height):
65
  selected_lora = loras[evt.index]
66
- new_placeholder = f"Type a prompt for {selected_lora['title']}"
67
  lora_repo = selected_lora["repo"]
68
- updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}) ✨"
 
69
  if "aspect" in selected_lora:
70
  if selected_lora["aspect"] == "portrait":
71
  width = 768
@@ -105,7 +106,7 @@ def run_lora(prompt, cfg_scale, steps, selected_index, randomize_seed, seed, wid
105
 
106
  selected_lora = loras[selected_index]
107
  lora_path = selected_lora["repo"]
108
- trigger_word = selected_lora["trigger_word"]
109
  if(trigger_word):
110
  if "trigger_position" in selected_lora:
111
  if selected_lora["trigger_position"] == "prepend":
@@ -150,12 +151,12 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
150
  )
151
  # Info blob stating what the app is running
152
  info_blob = gr.HTML(
153
- """<div id="info_blob"> Novorealist LoRa-stocked Birthweek-inspired Img Manufactory for Dunova, Dunovas, & Dunovaists!</div>"""
154
  )
155
 
156
  # Info blob stating what the app is running
157
  info_blob = gr.HTML(
158
- """<div id="info_blob">Trigger LoRAs by Pre-phrasing Prompts w/: 1-5. ADU person (/'ADU woman') photo |6-15. HST style |16. how2draw |17-20.HST |21. HST Austin Osman Spare style |22. RCA |23. propaganda poster |24. SOTS art |25. pficonics |26. wh3r3sw4ld0 |27. vintage cover |28. crisp photo |29. retrofuturism |30. Film Photo |31. TOK hybrid |32. 2004 photo |33. Unexpected photo |34. flmft |35. TOK portra |36. Yearbook photo |37. Akhmatova |38. Tsvetaeva |39. Blok |40. LEN Lenin |41. Trotsky |42. Rosa Luxemburg </div>"""
159
  )
160
  selected_index = gr.State(None)
161
  with gr.Row():
 
63
 
64
  def update_selection(evt: gr.SelectData, width, height):
65
  selected_lora = loras[evt.index]
66
+ new_placeholder = f"Prompt with activator word(s): '{selected_lora['trigger_word']}'! "
67
  lora_repo = selected_lora["repo"]
68
+ lora_trigger = selected_lora['trigger_word']
69
+ updated_text = f"### Selected: [{lora_repo}](https://huggingface.co/{lora_repo}). Prompt using: '{lora_trigger}'!"
70
  if "aspect" in selected_lora:
71
  if selected_lora["aspect"] == "portrait":
72
  width = 768
 
106
 
107
  selected_lora = loras[selected_index]
108
  lora_path = selected_lora["repo"]
109
+ trigger_word = selected_lora['trigger_word']
110
  if(trigger_word):
111
  if "trigger_position" in selected_lora:
112
  if selected_lora["trigger_position"] == "prepend":
 
151
  )
152
  # Info blob stating what the app is running
153
  info_blob = gr.HTML(
154
+ """<div id="info_blob"> Novorealist LoRa-stocked Birthweek-inspired Img Manufactory for Dunova, Dunovas, & Dunovaists! Nearly all of the LoRA adapters accessible via this space were trained by us in an extensive progression of inspired experiments and conceptual mini-projects. Check out our poetry translations at WWW.SILVERagePOETS.com Find our music on SoundCloud @ AlekseyCalvin & YouTube @ SilverAgePoets / AlekseyCalvin! </div>"""
155
  )
156
 
157
  # Info blob stating what the app is running
158
  info_blob = gr.HTML(
159
+ """<div id="info_blob"> To reinforce/focus in selected fine-tuned LoRAs (Low-Rank Adapters), add special “trigger" words/phrases to your prompts. </div>"""
160
  )
161
  selected_index = gr.State(None)
162
  with gr.Row():