Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,38 +1,32 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
model_1 = gr.load("models/pimpilikipilapi1/NSFW_master")
|
| 4 |
-
model_2 = gr.load("models/DiegoJR1973/NSFW-TrioHMH-Flux")
|
| 5 |
-
model_3 = gr.load("models/prashanth970/flux-lora-uncensored")
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
-
def generate_image_model_2(prompt):
|
| 12 |
-
prompt += " 8k"
|
| 13 |
-
return model_2(prompt)
|
| 14 |
|
| 15 |
-
def
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
interface = gr.Interface(
|
| 20 |
-
fn=
|
| 21 |
-
generate_image_model_1(prompt),
|
| 22 |
-
generate_image_model_2(prompt),
|
| 23 |
-
generate_image_model_3(prompt)
|
| 24 |
-
),
|
| 25 |
inputs=[
|
| 26 |
-
gr.Textbox(label="Type your
|
| 27 |
],
|
| 28 |
outputs=[
|
| 29 |
-
gr.Image(label="
|
| 30 |
-
gr.Image(label="
|
| 31 |
-
gr.Image(label="
|
| 32 |
],
|
| 33 |
-
title="Text to Image (NSFW) 🔞",
|
| 34 |
theme="NoCrypt/miku",
|
| 35 |
-
description="
|
| 36 |
)
|
| 37 |
|
| 38 |
interface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import random
|
| 3 |
+
import os
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
model1 = gr.load("models/pimpilikipilapi1/NSFW_master")
|
| 7 |
+
model2 = gr.load("models/DiegoJR1973/NSFW-TrioHMH-Flux")
|
| 8 |
+
model3 = gr.load("models/prashanth970/flux-lora-uncensored")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
def generate_images(text):
|
| 12 |
+
result_image1 = model1(text)
|
| 13 |
+
result_image2 = model2(text)
|
| 14 |
+
result_image3 = model3(text)
|
| 15 |
+
|
| 16 |
+
return result_image1, result_image2, result_image3
|
| 17 |
|
| 18 |
interface = gr.Interface(
|
| 19 |
+
fn=generate_images,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
inputs=[
|
| 21 |
+
gr.Textbox(label="Type here your imagination:", placeholder="Type or click an example..."),
|
| 22 |
],
|
| 23 |
outputs=[
|
| 24 |
+
gr.Image(label="Model 1 Output"),
|
| 25 |
+
gr.Image(label="Model 2 Output"),
|
| 26 |
+
gr.Image(label="Model 3 Output")
|
| 27 |
],
|
|
|
|
| 28 |
theme="NoCrypt/miku",
|
| 29 |
+
description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
|
| 30 |
)
|
| 31 |
|
| 32 |
interface.launch()
|