Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,10 +27,10 @@ from modules.model_edit import Step1XParams, Step1XEdit
|
|
| 27 |
print("TORCH_CUDA", torch.cuda.is_available())
|
| 28 |
|
| 29 |
examples = [
|
| 30 |
-
["
|
| 31 |
-
["
|
| 32 |
-
["
|
| 33 |
-
["
|
| 34 |
]
|
| 35 |
|
| 36 |
def generate_examples(init_image, prompt):
|
|
@@ -394,7 +394,7 @@ class ImageGenerator:
|
|
| 394 |
|
| 395 |
|
| 396 |
# 樑εδ»εΊIDοΌε¦οΌ"bert-base-uncased"οΌ
|
| 397 |
-
model_repo = "
|
| 398 |
# ζ¬ε°δΏεθ·―εΎ
|
| 399 |
model_path = "./model_weights"
|
| 400 |
os.makedirs(model_path, exist_ok=True)
|
|
@@ -449,13 +449,13 @@ def inference(prompt, ref_images, seed, size_level):
|
|
| 449 |
with gr.Blocks() as demo:
|
| 450 |
gr.Markdown(
|
| 451 |
"""
|
| 452 |
-
#
|
| 453 |
"""
|
| 454 |
)
|
| 455 |
with gr.Row():
|
| 456 |
with gr.Column():
|
| 457 |
prompt = gr.Textbox(
|
| 458 |
-
label="
|
| 459 |
value='Remove the person from the image.',
|
| 460 |
)
|
| 461 |
init_image = gr.Image(label="Input Image", type='pil')
|
|
|
|
| 27 |
print("TORCH_CUDA", torch.cuda.is_available())
|
| 28 |
|
| 29 |
examples = [
|
| 30 |
+
["meme.jpg", "turn into an illustration in studio ghibli style",("meme.jpg","ghibli_meme.jpg"),],
|
| 31 |
+
["celeb_meme.jpg", "replace the gray blazer with a leather jacket",("celeb_meme.jpg","leather.jpg")],
|
| 32 |
+
["cookie.png", "remove the cookie",("cookie.png","no_cookie.png")],
|
| 33 |
+
["poster_orig.jpg", "replace 'lambs' with 'llamas'",("poster_orig.jpg","poster.jpg")],
|
| 34 |
]
|
| 35 |
|
| 36 |
def generate_examples(init_image, prompt):
|
|
|
|
| 394 |
|
| 395 |
|
| 396 |
# 樑εδ»εΊIDοΌε¦οΌ"bert-base-uncased"οΌ
|
| 397 |
+
model_repo = "MoinulwithAI/TextToImageEdit/"
|
| 398 |
# ζ¬ε°δΏεθ·―εΎ
|
| 399 |
model_path = "./model_weights"
|
| 400 |
os.makedirs(model_path, exist_ok=True)
|
|
|
|
| 449 |
with gr.Blocks() as demo:
|
| 450 |
gr.Markdown(
|
| 451 |
"""
|
| 452 |
+
# TextToImageEdit
|
| 453 |
"""
|
| 454 |
)
|
| 455 |
with gr.Row():
|
| 456 |
with gr.Column():
|
| 457 |
prompt = gr.Textbox(
|
| 458 |
+
label="prompt",
|
| 459 |
value='Remove the person from the image.',
|
| 460 |
)
|
| 461 |
init_image = gr.Image(label="Input Image", type='pil')
|