Spaces:
Runtime error
Runtime error
Commit
•
7fa432c
1
Parent(s):
b3b2261
Update app.py
Browse files
app.py
CHANGED
@@ -500,7 +500,7 @@ def check_token(token):
|
|
500 |
|
501 |
def check_if_tok(sentence, textual_inversion):
|
502 |
if "TOK" not in sentence and textual_inversion:
|
503 |
-
gr.Warning("⚠️ You've removed the special token TOK from your concept sentence. This will degrade performance as this special token is needed for textual inversion. Use
|
504 |
|
505 |
css = '''.gr-group{background-color: transparent;box-shadow: var(--block-shadow)}
|
506 |
.gr-group .hide-container{padding: 1em; background: var(--block-background-fill) !important}
|
@@ -864,7 +864,7 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
864 |
concept_sentence.change(
|
865 |
check_if_tok,
|
866 |
inputs=[concept_sentence, train_text_encoder_ti],
|
867 |
-
|
868 |
)
|
869 |
use_snr_gamma.change(
|
870 |
lambda x: gr.update(visible=x),
|
|
|
500 |
|
501 |
def check_if_tok(sentence, textual_inversion):
|
502 |
if "TOK" not in sentence and textual_inversion:
|
503 |
+
gr.Warning("⚠️ You've removed the special token TOK from your concept sentence. This will degrade performance as this special token is needed for textual inversion. Use TOK to describe what you are training.")
|
504 |
|
505 |
css = '''.gr-group{background-color: transparent;box-shadow: var(--block-shadow)}
|
506 |
.gr-group .hide-container{padding: 1em; background: var(--block-background-fill) !important}
|
|
|
864 |
concept_sentence.change(
|
865 |
check_if_tok,
|
866 |
inputs=[concept_sentence, train_text_encoder_ti],
|
867 |
+
concurrency_limit=50
|
868 |
)
|
869 |
use_snr_gamma.change(
|
870 |
lambda x: gr.update(visible=x),
|