Spaces:
Running
Running
File size: 1,773 Bytes
17e58be 77efc8c 6dee790 3e587f4 20a03f1 3e587f4 625e1fa 6dee790 50043a1 6dee790 20a03f1 6dee790 3e587f4 50043a1 6dee790 f5bddfa 0389d06 6dee790 0389d06 3528cb9 50043a1 20a03f1 3e587f4 50043a1 945386e 6dee790 50043a1 6dee790 3e587f4 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 47 48 49 50 51 52 |
import gradio as gr
model1 = gr.load("models/Jonny001/NSFW_master")
model2 = gr.load("models/Jonny001/Alita-v1")
model3 = gr.load("models/lexa862/NSFWmodel")
model4 = gr.load("models/Keltezaa/flux_pussy_NSFW")
model5 = 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 (Alita)":
model = model2
elif selected_model == "Model 3 (Lexa NSFW)":
model = model3
elif selected_model == "Model 4 (Flux NSFW)":
model = model4
elif selected_model == "Model 4 (Lora Uncensored)":
model = model5
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 (Alita)", "Model 3 (Lexa NSFW)", "Model 4 (Flux NSFW)", "Model 5 (Lora Uncensored)"],
label="Select Model (Try All Models & Get Different Results)",
value="Model 1 (NSFW Master)",
),
],
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.",
cache_examples=False,
)
interface.launch() |