Spaces:
Runtime error
Runtime error
File size: 758 Bytes
b5df4eb 6a1f0d6 b5df4eb 6a1f0d6 5dc108b 6a1f0d6 9d89616 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from transformers import pipeline
# Load the pre-trained model for text-to-image generation (assuming the model is compatible with this task)
generator = pipeline("text-to-image", model="username/lustlyai-flux-lustly-ai-nsfw-v1")
def generate_image_from_prompt(prompt):
image = generator(prompt)
return image[0] # Assuming the generator returns a list of images
# Create the Gradio interface
iface = gr.Interface(
fn=generate_image_from_prompt,
inputs=gr.Textbox(label="Enter Your NSFW Prompt"),
outputs=gr.Image(label="Generated Image"),
title="Lustlyai-Flux NSFW Image Generator",
description="Generate NSFW images based on your text prompts.",
theme="dark"
)
# Launch the interface
iface.launch()
|