promptGenerator / app.py
Ifeanyi's picture
Update app.py
27aeeb4
raw
history blame
729 Bytes
from transformers import pipeline
import gradio as gr
def PromptGenerator(prompt):
pipe = pipeline("text-generation", model="Gustavosta/MagicPrompt-Stable-Diffusion")
prompt = pipe(prompt)
prompt = prompt[0]
prompt = prompt["generated_text"]
return prompt
app = gr.Interface(PromptGenerator,
inputs = "text",
outputs = "text",
theme = gr.themes.Soft(primary_hue="blue",secondary_hue="stone"),
title = "AI Prompt Generator",
examples = ["Landscape of","Pixar style little girl","A racecar driving","Fireflies at night"],
css = ".gradio-container {background: url('file=boy 2.jpeg')}"
)
app.launch()