Jonny001 commited on
Commit
3aec09f
·
verified ·
1 Parent(s): f94ea70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -23
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
- def generate_image_model_1(prompt):
8
- prompt += " 2k"
9
- return model_1(prompt)
10
 
11
- def generate_image_model_2(prompt):
12
- prompt += " 8k"
13
- return model_2(prompt)
14
 
15
- def generate_image_model_3(prompt):
16
- prompt += " 10k"
17
- return model_3(prompt)
 
 
 
18
 
19
  interface = gr.Interface(
20
- fn=lambda prompt: (
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 prompt here: ✍️", placeholder="Describe what you want..."),
27
  ],
28
  outputs=[
29
- gr.Image(label="Generated Image - Model 1"),
30
- gr.Image(label="Generated Image - Model 2"),
31
- gr.Image(label="Generated Image - Model 3"),
32
  ],
33
- title="Text to Image (NSFW) 🔞",
34
  theme="NoCrypt/miku",
35
- description="⚠️ Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
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()