Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,34 +18,71 @@ rmbgkey = os.getenv("RMBGKEY")
|
|
| 18 |
|
| 19 |
#fore, prompt, intensity, mode, refprompt, isrmbg
|
| 20 |
example_list = [
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
def rmbg(pil_image):
|
| 51 |
|
|
|
|
| 18 |
|
| 19 |
#fore, prompt, intensity, mode, refprompt, isrmbg
|
| 20 |
example_list = [
|
| 21 |
+
[
|
| 22 |
+
"examples/in1.jpg",
|
| 23 |
+
"A Perfume Bottle, on an ornate marble pedestal, surrounded by cascading jasmine vines, under the soft glow of antique lanterns in an enchanted forest",
|
| 24 |
+
3.50,
|
| 25 |
+
"full",
|
| 26 |
+
"A transparent Bottle with a semi transparent purple liquide, studio light",
|
| 27 |
+
False,
|
| 28 |
+
"examples/out1.png",
|
| 29 |
+
],
|
| 30 |
+
[
|
| 31 |
+
"examples/in2.jpg",
|
| 32 |
+
"Headphones, hovering gracefully against a swirling pastel galaxy, accented by glimmers of stardust, ethereal light beams, and floating musical notes, under a dreamy aurora borealis, with no visible wires",
|
| 33 |
+
2.50,
|
| 34 |
+
"full",
|
| 35 |
+
"white headphones, vibrant, colorful, ",
|
| 36 |
+
True,
|
| 37 |
+
"examples/out2.png",
|
| 38 |
+
],
|
| 39 |
+
[
|
| 40 |
+
"examples/in3.jpg",
|
| 41 |
+
"A PAir of Shoes, resting on a sleek white platform under a bright spotlight, with subtle pastel-colored reflections and delicate flower petals scattered around, creating a cheerful and elegant setting",
|
| 42 |
+
3.0,
|
| 43 |
+
"full",
|
| 44 |
+
"A brown Pair of Shoes, vibrant, Shadow",
|
| 45 |
+
True,
|
| 46 |
+
"examples/out3.png",
|
| 47 |
+
],
|
| 48 |
+
[
|
| 49 |
+
"examples/in4.jpg",
|
| 50 |
+
"A Bottle, placed on a rustic wooden table, viewed from a slight above angle, overlooking a serene beach, with seashells and driftwood artfully scattered around, bathed in the warm glow of the setting sun",
|
| 51 |
+
2.50,
|
| 52 |
+
"full",
|
| 53 |
+
"A transparent Bottle with a black cap and a semi transparent liquide, Sunset",
|
| 54 |
+
False,
|
| 55 |
+
"examples/out4.png",
|
| 56 |
+
],
|
| 57 |
+
[
|
| 58 |
+
"examples/in5.jpg",
|
| 59 |
+
"A Perfume bottle, perched delicately on a rock by the ocean, with a breathtaking sunset casting a golden glow over the waves",
|
| 60 |
+
4.0,
|
| 61 |
+
"full",
|
| 62 |
+
"A glass perfume Bottle, with a yellow lequide and a black cap, sunset, transparent",
|
| 63 |
+
True,
|
| 64 |
+
"examples/out5.png",
|
| 65 |
+
],
|
| 66 |
+
[
|
| 67 |
+
"examples/in6.jpg",
|
| 68 |
+
"A Sofa, In a snug, inviting room, a large sofa accompanied by plush cushions, a thick rug, book-filled shelves, potted plants, framed art, a coffee table with candles, a floor lamp, and gentle, warm lighting",
|
| 69 |
+
3.0,
|
| 70 |
+
"full",
|
| 71 |
+
"A light grey Sofa, studio light, shadows",
|
| 72 |
+
True,
|
| 73 |
+
"examples/out6.png",
|
| 74 |
+
],
|
| 75 |
+
[
|
| 76 |
+
"examples/in7.jpg",
|
| 77 |
+
"A car, on a high-tech city street at night, surrounded by neon lights and holographic billboards, with sleek skyscrapers and flying cars in the background, a glowing cyber-road beneath",
|
| 78 |
+
3.0,
|
| 79 |
+
"full",
|
| 80 |
+
"A light grey Car, vibrant, reflections",
|
| 81 |
+
True,
|
| 82 |
+
"examples/out7.png",
|
| 83 |
+
],
|
| 84 |
+
]
|
| 85 |
+
|
| 86 |
|
| 87 |
def rmbg(pil_image):
|
| 88 |
|