Spaces:
Runtime error
Runtime error
Update app.py
Browse files26 unmodified lines2728293031323330313233343536357 unmodified lines39439539639739739839940048 unmodified lines44945045145245245345445545645745845845946046126 unmodified linesprint("TORCH_CUDA", torch.cuda.is_available())
examples = [["meme.jpg", "turn into an illustration in studio ghibli style",("meme.jpg","ghibli_meme.jpg"),],["celeb_meme.jpg", "replace the gray blazer with a leather jacket",("celeb_meme.jpg","leather.jpg")],["cookie.png", "remove the cookie",("cookie.png","no_cookie.png")],["poster_orig.jpg", "replace 'lambs' with 'llamas'",("poster_orig.jpg","poster.jpg")],["examples 2/meme.jpg", "turn into an illustration in studio ghibli style",("examples 2/meme.jpg","examples 2/ghibli_meme.jpg"),],["examples 2/celeb_meme.jpg", "replace the gray blazer with a leather jacket",("examples 2/celeb_meme.jpg","examples 2/leather.jpg")],["examples 2/cookie.png", "remove the cookie",("examples 2/cookie.png","examples 2/no_cookie.png")],["examples 2/poster_orig.jpg", "replace 'lambs' with 'llamas'",("examples 2/poster_orig.jpg","examples 2/poster.jpg")],]
def generate_examples(init_image, prompt):357 unmodified lines
# 樑εδ»εΊIDοΌε¦οΌ"bert-base-uncased"οΌmodel_repo = "MoinulwithAI/TextToImageEdit/"model_repo = "stepfun-ai/Step1X-Edit"# ζ¬ε°δΏεθ·―εΎmodel_path = "./model_weights"os.makedirs(model_path, exist_ok=True)48 unmodified lineswith gr.Blocks() as demo: gr.Markdown( """ # TextToImageEdit # Step1X-Edit """ ) with gr.Row(): with gr.Column(): prompt = gr.Textbox( label="prompt", label="ηΌθΎζ什 prompt", value='Remove the person from the image.', ) init_image = gr.Image(label="Input Image", type='pil')app.py+7-7