Update app.py
Browse files
app.py
CHANGED
@@ -110,10 +110,22 @@ css = """
|
|
110 |
}
|
111 |
"""
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
118 |
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
"""
|
112 |
|
113 |
+
with gr.Blocks(css=css) as demo:
|
114 |
+
with gr.Row():
|
115 |
+
with gr.Column():
|
116 |
+
gr.Markdown("<h1>NSFW-GEN</h1>")
|
117 |
+
text_prompt = gr.Textbox(label="Enter Prompt", placeholder="Example: a cute dog", lines=2)
|
118 |
+
generate_button = gr.Button("Generate Image", variant='primary')
|
119 |
|
120 |
+
with gr.Column():
|
121 |
+
gr.Markdown("<h4>Advanced Settings</h4>")
|
122 |
+
with gr.Accordion("Advanced Customizations", open=False):
|
123 |
+
negative_prompt = gr.Textbox(label="Negative Prompt (Optional)", placeholder="Example: blurry, unfocused", lines=2)
|
124 |
+
image_style = gr.Dropdown(label="Select Style", choices=["None style", "Cinematic", "Digital Art", "Portrait"], value="None style")
|
125 |
+
|
126 |
+
with gr.Row():
|
127 |
+
image_output = gr.Image(type="pil", label="Output Image")
|
128 |
+
|
129 |
+
generate_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
130 |
+
|
131 |
+
demo.launch()
|