File size: 1,489 Bytes
3528cb9 17e58be 77efc8c 6dee790 50043a1 625e1fa 6dee790 50043a1 6dee790 50043a1 6dee790 50043a1 6dee790 f5bddfa 0389d06 6dee790 0389d06 3528cb9 50043a1 d2075dc 50043a1 945386e 6dee790 50043a1 6dee790 0389d06 146f57d 50043a1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#model1 = gr.load("models/pimpilikipilapi1/NSFW_master")
#model2 = gr.load("models/DiegoJR1973/NSFW-TrioHMH-Flux")
#model3 = gr.load("models/prashanth970/flux-lora-uncensored")
import gradio as gr
model1 = gr.load("models/pimpilikipilapi1/NSFW_master")
model2 = gr.load("models/prashanth970/flux-lora-uncensored")
def generate_images(text, selected_model):
if selected_model == "Model 1 (NSFW Master)":
model = model1
elif selected_model == "Model 2 (Flux Lora Uncensored)":
model = model2
else:
return "Invalid model selection."
results = []
for i in range(3):
modified_text = f"{text} variation {i+1}"
result = model(modified_text)
results.append(result)
return results
interface = gr.Interface(
fn=generate_images,
inputs=[
gr.Textbox(label="Type here your imagination:", placeholder="Type your prompt..."),
gr.Radio(
["Model 1 (NSFW Master)", "Model 2 (Flux Lora Uncensored)"],
label="Select Model",
value="Model 2 (Flux Lora Uncensored)",
),
],
outputs=[
gr.Image(label="Generated Image 1"),
gr.Image(label="Generated Image 2"),
gr.Image(label="Generated Image 3"),
],
theme="Yntec/HaleyCH_Theme_Orange",
description="⚠ Sorry for the inconvenience. The models are currently running on the CPU, which might affect performance. We appreciate your understanding.",
)
interface.launch() |