Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
# import os
|
3 |
-
# import sys
|
4 |
-
# from pathlib import Path
|
5 |
import time
|
6 |
|
7 |
models =[
|
8 |
-
"enhanceaiteam/Flux-uncensored",
|
9 |
-
"CultriX/flux-nsfw-highress",
|
10 |
"pimpilikipilapi1/NSFW_master",
|
11 |
"DiegoJR1973/NSFW-TrioHMH-Flux",
|
12 |
-
"lustlyai/Flux_Lustly.ai_Uncensored_nsfw_v1",
|
13 |
"prashanth970/flux-lora-uncensored",
|
14 |
"black-forest-labs/FLUX.1-dev",
|
15 |
]
|
@@ -49,14 +43,12 @@ def all_task_end(cnt,t_stamp):
|
|
49 |
if et > to and t_stamp != 0:
|
50 |
d = gr.update(value=0)
|
51 |
tog = gr.update(value=1)
|
52 |
-
#print(f'to: {to} et: {et}')
|
53 |
else:
|
54 |
if cnt != 0:
|
55 |
d = gr.update(value=et)
|
56 |
else:
|
57 |
d = gr.update(value=0)
|
58 |
tog = gr.update(value=0)
|
59 |
-
#print (f'passing: to: {to} et: {et}')
|
60 |
pass
|
61 |
return d, tog
|
62 |
|
@@ -75,14 +67,10 @@ def clear_fn():
|
|
75 |
|
76 |
with gr.Blocks(title="SD Models") as my_interface:
|
77 |
with gr.Column(scale=12):
|
78 |
-
# with gr.Row():
|
79 |
-
# gr.Markdown("""- Primary prompt: 你想画的内容(英文单词,如 a cat, 加英文逗号效果更好;点 Improve 按钮进行完善)\n- Real prompt: 完善后的提示词,出现后再点右边的 Run 按钮开始运行""")
|
80 |
with gr.Row():
|
81 |
with gr.Row(scale=6):
|
82 |
primary_prompt=gr.Textbox(label="Prompt", value="")
|
83 |
-
# real_prompt=gr.Textbox(label="Real prompt")
|
84 |
with gr.Row(scale=6):
|
85 |
-
# improve_prompts_btn=gr.Button("Improve")
|
86 |
with gr.Row():
|
87 |
run=gr.Button("Run",variant="primary")
|
88 |
clear_btn=gr.Button("Clear")
|
@@ -120,11 +108,6 @@ with gr.Blocks(title="SD Models") as my_interface:
|
|
120 |
pass
|
121 |
pass
|
122 |
|
123 |
-
# improve_prompts_btn_clicked=improve_prompts_btn.click(
|
124 |
-
# get_prompts,
|
125 |
-
# inputs=[primary_prompt],
|
126 |
-
# outputs=[primary_prompt],
|
127 |
-
# cancels=list(runs_dict.values()))
|
128 |
clear_btn.click(
|
129 |
clear_fn,
|
130 |
None,
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
import time
|
3 |
|
4 |
models =[
|
|
|
|
|
5 |
"pimpilikipilapi1/NSFW_master",
|
6 |
"DiegoJR1973/NSFW-TrioHMH-Flux",
|
|
|
7 |
"prashanth970/flux-lora-uncensored",
|
8 |
"black-forest-labs/FLUX.1-dev",
|
9 |
]
|
|
|
43 |
if et > to and t_stamp != 0:
|
44 |
d = gr.update(value=0)
|
45 |
tog = gr.update(value=1)
|
|
|
46 |
else:
|
47 |
if cnt != 0:
|
48 |
d = gr.update(value=et)
|
49 |
else:
|
50 |
d = gr.update(value=0)
|
51 |
tog = gr.update(value=0)
|
|
|
52 |
pass
|
53 |
return d, tog
|
54 |
|
|
|
67 |
|
68 |
with gr.Blocks(title="SD Models") as my_interface:
|
69 |
with gr.Column(scale=12):
|
|
|
|
|
70 |
with gr.Row():
|
71 |
with gr.Row(scale=6):
|
72 |
primary_prompt=gr.Textbox(label="Prompt", value="")
|
|
|
73 |
with gr.Row(scale=6):
|
|
|
74 |
with gr.Row():
|
75 |
run=gr.Button("Run",variant="primary")
|
76 |
clear_btn=gr.Button("Clear")
|
|
|
108 |
pass
|
109 |
pass
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
clear_btn.click(
|
112 |
clear_fn,
|
113 |
None,
|