Spaces:
Running
Running
File size: 729 Bytes
1636073 27aeeb4 1636073 |
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 |
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()
|