Spaces:
Paused
Paused
P01yH3dr0n
commited on
Commit
•
f6ea2ab
1
Parent(s):
d46ff0f
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import datetime
|
|
3 |
|
4 |
import gradio as gr
|
5 |
from pnginfo import read_info_from_image, send_paras
|
|
|
6 |
|
7 |
from utils import set_token, generate_novelai_image, image_from_bytes
|
8 |
|
@@ -120,7 +121,7 @@ def main_ui():
|
|
120 |
gen_btn.click(generate, paras + [others[0], others[4]], [image, info])
|
121 |
others[2].click(lambda o, s: o if len(s) == 0 else s['parameters']['seed'], inputs=[paras[3], info], outputs=paras[3])
|
122 |
others[3].click(lambda i: i, inputs=image, outputs=paras[14])
|
123 |
-
others[5].click(lambda i: gr.ImageEditor(value=
|
124 |
return page, paras[:14]
|
125 |
|
126 |
|
|
|
3 |
|
4 |
import gradio as gr
|
5 |
from pnginfo import read_info_from_image, send_paras
|
6 |
+
from PIL import Image
|
7 |
|
8 |
from utils import set_token, generate_novelai_image, image_from_bytes
|
9 |
|
|
|
121 |
gen_btn.click(generate, paras + [others[0], others[4]], [image, info])
|
122 |
others[2].click(lambda o, s: o if len(s) == 0 else s['parameters']['seed'], inputs=[paras[3], info], outputs=paras[3])
|
123 |
others[3].click(lambda i: i, inputs=image, outputs=paras[14])
|
124 |
+
others[5].click(lambda i: gr.ImageEditor(value=Image.new('RGBA', (256,256), 'red')), inputs=image, outputs=paras[17])
|
125 |
return page, paras[:14]
|
126 |
|
127 |
|