Spaces:
Sleeping
Sleeping
AlekseyCalvin
commited on
Commit
•
7c1444c
1
Parent(s):
e26bfcd
Update app.py
Browse files
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"
|
67 |
lora_repo = selected_lora["repo"]
|
68 |
-
|
|
|
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[
|
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
|
154 |
)
|
155 |
|
156 |
# Info blob stating what the app is running
|
157 |
info_blob = gr.HTML(
|
158 |
-
"""<div id="info_blob">
|
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():
|