Spaces:
Sleeping
Sleeping
lichorosario
commited on
Commit
•
f13315f
1
Parent(s):
8409400
Actualizar app.py para usar el cliente Tile-Upscaler nuevo
Browse files
app.py
CHANGED
@@ -58,6 +58,12 @@ def infer(selected_index, prompt, style_prompt, inf_steps, guidance_scale, width
|
|
58 |
)
|
59 |
weight_name = result.result()[2]['value']
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
prompt_arr = [trigger_word, prompt, style_prompt]
|
62 |
prompt = '. '.join([element.strip() for element in prompt_arr if element.strip() != ''])
|
63 |
|
|
|
58 |
)
|
59 |
weight_name = result.result()[2]['value']
|
60 |
|
61 |
+
if prompt.startswith(trigger_word):
|
62 |
+
prompt = prompt[len(trigger_word):]
|
63 |
+
|
64 |
+
if prompt.endswith(style_prompt):
|
65 |
+
prompt = prompt[:-len(style_prompt)]
|
66 |
+
|
67 |
prompt_arr = [trigger_word, prompt, style_prompt]
|
68 |
prompt = '. '.join([element.strip() for element in prompt_arr if element.strip() != ''])
|
69 |
|