Spaces:
Running
on
Zero
Running
on
Zero
Upload 2 files
Browse files- app.py +9 -9
- requirements.txt +1 -2
app.py
CHANGED
@@ -412,7 +412,7 @@ from tagger import (
|
|
412 |
remove_specific_prompt,
|
413 |
insert_recom_prompt,
|
414 |
compose_prompt_to_copy,
|
415 |
-
translate_prompt,
|
416 |
select_random_character,
|
417 |
)
|
418 |
from modutils import (
|
@@ -906,7 +906,7 @@ with gr.Blocks(theme="NoCrypt/miku", elem_id="main", css=CSS) as app:
|
|
906 |
prompt_gui = gr.Textbox(lines=6, placeholder="1girl, solo, ...", label="Prompt", show_copy_button=True)
|
907 |
with gr.Accordion("Negative prompt, etc.", open=False) as menu_negative:
|
908 |
neg_prompt_gui = gr.Textbox(lines=3, placeholder="lowres, (bad), ...", label="Negative prompt", show_copy_button=True)
|
909 |
-
translate_prompt_button = gr.Button(value="Translate prompt to English", size="sm", variant="secondary")
|
910 |
with gr.Accordion(label="Advanced options", open=False):
|
911 |
insert_prompt_gui = gr.Radio(label="Insert reccomended positive / negative prompt", choices=["None", "Animagine", "Pony"], value="None", interactive=True, scale=2)
|
912 |
prompt_type_gui = gr.Radio(label="Convert tags to", choices=["danbooru", "e621"], value="e621", visible=False)
|
@@ -1746,9 +1746,9 @@ with gr.Blocks(theme="NoCrypt/miku", elem_id="main", css=CSS) as app:
|
|
1746 |
outputs=[prompt_gui, elapsed_time_dbt, copy_button_dbt, copy_button_dbt],
|
1747 |
)
|
1748 |
|
1749 |
-
translate_prompt_button.click(translate_prompt, inputs=[prompt_gui], outputs=[prompt_gui])
|
1750 |
-
translate_prompt_button.click(translate_prompt, inputs=[character_dbt], outputs=[character_dbt])
|
1751 |
-
translate_prompt_button.click(translate_prompt, inputs=[series_dbt], outputs=[series_dbt])
|
1752 |
|
1753 |
generate_button.click(
|
1754 |
fn=sd_gen.load_new_model,
|
@@ -1891,7 +1891,7 @@ with gr.Blocks(theme="NoCrypt/miku", elem_id="main", css=CSS) as app:
|
|
1891 |
input_general = gr.TextArea(label="General tags", lines=4, placeholder="1girl, ...", value="")
|
1892 |
input_tags_to_copy = gr.Textbox(value="", visible=False)
|
1893 |
copy_input_btn = gr.Button(value="Copy to clipboard", size="sm", interactive=False)
|
1894 |
-
translate_input_prompt_button = gr.Button(value="Translate prompt to English", size="sm", variant="secondary")
|
1895 |
tag_type = gr.Radio(label="Output tag conversion", info="danbooru for Animagine, e621 for Pony.", choices=["danbooru", "e621"], value="e621", visible=False)
|
1896 |
input_rating = gr.Radio(label="Rating", choices=list(V2_RATING_OPTIONS), value="explicit")
|
1897 |
with gr.Accordion(label="Advanced options", open=False):
|
@@ -1929,9 +1929,9 @@ with gr.Blocks(theme="NoCrypt/miku", elem_id="main", css=CSS) as app:
|
|
1929 |
input_ban_tags,
|
1930 |
]
|
1931 |
|
1932 |
-
translate_input_prompt_button.click(translate_prompt, inputs=[input_general], outputs=[input_general])
|
1933 |
-
translate_input_prompt_button.click(translate_prompt, inputs=[input_character], outputs=[input_character])
|
1934 |
-
translate_input_prompt_button.click(translate_prompt, inputs=[input_copyright], outputs=[input_copyright])
|
1935 |
|
1936 |
generate_from_image_btn.click(
|
1937 |
predict_tags_wd,
|
|
|
412 |
remove_specific_prompt,
|
413 |
insert_recom_prompt,
|
414 |
compose_prompt_to_copy,
|
415 |
+
#translate_prompt,
|
416 |
select_random_character,
|
417 |
)
|
418 |
from modutils import (
|
|
|
906 |
prompt_gui = gr.Textbox(lines=6, placeholder="1girl, solo, ...", label="Prompt", show_copy_button=True)
|
907 |
with gr.Accordion("Negative prompt, etc.", open=False) as menu_negative:
|
908 |
neg_prompt_gui = gr.Textbox(lines=3, placeholder="lowres, (bad), ...", label="Negative prompt", show_copy_button=True)
|
909 |
+
#translate_prompt_button = gr.Button(value="Translate prompt to English", size="sm", variant="secondary")
|
910 |
with gr.Accordion(label="Advanced options", open=False):
|
911 |
insert_prompt_gui = gr.Radio(label="Insert reccomended positive / negative prompt", choices=["None", "Animagine", "Pony"], value="None", interactive=True, scale=2)
|
912 |
prompt_type_gui = gr.Radio(label="Convert tags to", choices=["danbooru", "e621"], value="e621", visible=False)
|
|
|
1746 |
outputs=[prompt_gui, elapsed_time_dbt, copy_button_dbt, copy_button_dbt],
|
1747 |
)
|
1748 |
|
1749 |
+
#translate_prompt_button.click(translate_prompt, inputs=[prompt_gui], outputs=[prompt_gui])
|
1750 |
+
#translate_prompt_button.click(translate_prompt, inputs=[character_dbt], outputs=[character_dbt])
|
1751 |
+
#translate_prompt_button.click(translate_prompt, inputs=[series_dbt], outputs=[series_dbt])
|
1752 |
|
1753 |
generate_button.click(
|
1754 |
fn=sd_gen.load_new_model,
|
|
|
1891 |
input_general = gr.TextArea(label="General tags", lines=4, placeholder="1girl, ...", value="")
|
1892 |
input_tags_to_copy = gr.Textbox(value="", visible=False)
|
1893 |
copy_input_btn = gr.Button(value="Copy to clipboard", size="sm", interactive=False)
|
1894 |
+
#translate_input_prompt_button = gr.Button(value="Translate prompt to English", size="sm", variant="secondary")
|
1895 |
tag_type = gr.Radio(label="Output tag conversion", info="danbooru for Animagine, e621 for Pony.", choices=["danbooru", "e621"], value="e621", visible=False)
|
1896 |
input_rating = gr.Radio(label="Rating", choices=list(V2_RATING_OPTIONS), value="explicit")
|
1897 |
with gr.Accordion(label="Advanced options", open=False):
|
|
|
1929 |
input_ban_tags,
|
1930 |
]
|
1931 |
|
1932 |
+
#translate_input_prompt_button.click(translate_prompt, inputs=[input_general], outputs=[input_general])
|
1933 |
+
#translate_input_prompt_button.click(translate_prompt, inputs=[input_character], outputs=[input_character])
|
1934 |
+
#translate_input_prompt_button.click(translate_prompt, inputs=[input_copyright], outputs=[input_copyright])
|
1935 |
|
1936 |
generate_from_image_btn.click(
|
1937 |
predict_tags_wd,
|
requirements.txt
CHANGED
@@ -10,7 +10,6 @@ optimum[onnxruntime]
|
|
10 |
spaces
|
11 |
dartrs
|
12 |
huggingface_hub
|
13 |
-
httpx
|
14 |
httpcore
|
15 |
-
googletrans==4.0.0rc1
|
16 |
timm
|
|
|
10 |
spaces
|
11 |
dartrs
|
12 |
huggingface_hub
|
13 |
+
httpx
|
14 |
httpcore
|
|
|
15 |
timm
|