Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
comdoleger
commited on
Commit
β’
7bfcbea
1
Parent(s):
0bd99b7
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ api = os.getenv("FAI_API")
|
|
17 |
rmbgkey = os.getenv("RMBGKEY")
|
18 |
|
19 |
#fore, prompt, intensity, mode, refprompt, isrmbg
|
|
|
20 |
example_list = [
|
21 |
[
|
22 |
"examples/in1.png",
|
@@ -24,8 +25,8 @@ example_list = [
|
|
24 |
4.0,
|
25 |
"full",
|
26 |
"A transparent Bottle with a semi transparent purple liquide, studio light",
|
27 |
-
False
|
28 |
-
|
29 |
],
|
30 |
[
|
31 |
"examples/in3.png",
|
@@ -34,7 +35,7 @@ example_list = [
|
|
34 |
"full",
|
35 |
"A brown Pair of Shoes, vibrant, Shadow",
|
36 |
False,
|
37 |
-
|
38 |
],
|
39 |
[
|
40 |
"examples/in4.png",
|
@@ -43,7 +44,7 @@ example_list = [
|
|
43 |
"full",
|
44 |
"A transparent Bottle with a black cap and a semi transparent liquide, Sunset",
|
45 |
False,
|
46 |
-
|
47 |
],
|
48 |
[
|
49 |
"examples/in5.png",
|
@@ -52,7 +53,7 @@ example_list = [
|
|
52 |
"full",
|
53 |
"A glass perfume Bottle, with a yellow lequide and a black cap, sunset, transparent",
|
54 |
False,
|
55 |
-
|
56 |
],
|
57 |
[
|
58 |
"examples/in6.png",
|
@@ -61,7 +62,7 @@ example_list = [
|
|
61 |
"full",
|
62 |
"A light grey Sofa, studio light, shadows",
|
63 |
False,
|
64 |
-
|
65 |
],
|
66 |
[
|
67 |
"examples/in7.png",
|
@@ -70,7 +71,7 @@ example_list = [
|
|
70 |
"full",
|
71 |
"A light grey Car, vibrant, reflections",
|
72 |
False,
|
73 |
-
|
74 |
],
|
75 |
[
|
76 |
"examples/in2.png",
|
@@ -79,7 +80,7 @@ example_list = [
|
|
79 |
"full",
|
80 |
"white headphones, vibrant, colorful, ",
|
81 |
False,
|
82 |
-
|
83 |
]
|
84 |
]
|
85 |
|
@@ -406,20 +407,26 @@ with block:
|
|
406 |
<center><h2><a href="https://fotographer.ai/">π Check Out our other Projects Here!</a></h2></center>""")
|
407 |
|
408 |
with gr.Row():
|
409 |
-
|
410 |
-
before = gr.Image(image_mode='RGBA', type="pil", label="Input", height=400)
|
411 |
-
imgholder = gr.Image(image_mode='RGBA', type="pil", height=400, label='Output')
|
412 |
-
|
413 |
gr.Examples(
|
414 |
fn=process_generate,
|
415 |
examples=example_list,
|
416 |
inputs=[
|
417 |
-
fore, prompt, intensity, mode, refprompt, isrmbg
|
418 |
],
|
419 |
outputs=[result_gallery],
|
420 |
-
run_on_click=
|
421 |
|
422 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
ins = [fore, prompt, intensity, mode, refprompt, isrmbg]
|
425 |
generate_button.click(fn=process_generate, inputs=ins, outputs=[result_gallery])
|
|
|
17 |
rmbgkey = os.getenv("RMBGKEY")
|
18 |
|
19 |
#fore, prompt, intensity, mode, refprompt, isrmbg
|
20 |
+
outputs_list = [["examples/out1.png"],["examples/out3.png"], ["examples/out4.png"],["examples/out5.png"],["examples/out6.png"],["examples/out7.png"],["examples/out2.png"]]
|
21 |
example_list = [
|
22 |
[
|
23 |
"examples/in1.png",
|
|
|
25 |
4.0,
|
26 |
"full",
|
27 |
"A transparent Bottle with a semi transparent purple liquide, studio light",
|
28 |
+
False
|
29 |
+
|
30 |
],
|
31 |
[
|
32 |
"examples/in3.png",
|
|
|
35 |
"full",
|
36 |
"A brown Pair of Shoes, vibrant, Shadow",
|
37 |
False,
|
38 |
+
|
39 |
],
|
40 |
[
|
41 |
"examples/in4.png",
|
|
|
44 |
"full",
|
45 |
"A transparent Bottle with a black cap and a semi transparent liquide, Sunset",
|
46 |
False,
|
47 |
+
|
48 |
],
|
49 |
[
|
50 |
"examples/in5.png",
|
|
|
53 |
"full",
|
54 |
"A glass perfume Bottle, with a yellow lequide and a black cap, sunset, transparent",
|
55 |
False,
|
56 |
+
|
57 |
],
|
58 |
[
|
59 |
"examples/in6.png",
|
|
|
62 |
"full",
|
63 |
"A light grey Sofa, studio light, shadows",
|
64 |
False,
|
65 |
+
|
66 |
],
|
67 |
[
|
68 |
"examples/in7.png",
|
|
|
71 |
"full",
|
72 |
"A light grey Car, vibrant, reflections",
|
73 |
False,
|
74 |
+
|
75 |
],
|
76 |
[
|
77 |
"examples/in2.png",
|
|
|
80 |
"full",
|
81 |
"white headphones, vibrant, colorful, ",
|
82 |
False,
|
83 |
+
|
84 |
]
|
85 |
]
|
86 |
|
|
|
407 |
<center><h2><a href="https://fotographer.ai/">π Check Out our other Projects Here!</a></h2></center>""")
|
408 |
|
409 |
with gr.Row():
|
410 |
+
|
|
|
|
|
|
|
411 |
gr.Examples(
|
412 |
fn=process_generate,
|
413 |
examples=example_list,
|
414 |
inputs=[
|
415 |
+
fore, prompt, intensity, mode, refprompt, isrmbg
|
416 |
],
|
417 |
outputs=[result_gallery],
|
418 |
+
run_on_click=False, examples_per_page=1024
|
419 |
|
420 |
)
|
421 |
+
|
422 |
+
with gr.Column():
|
423 |
+
dummy_image_for_outputs = gr.Image(visible=False, label='Result')
|
424 |
+
gr.Examples(
|
425 |
+
examples=outputs_list,
|
426 |
+
inputs=[dummy_image_for_outputs]
|
427 |
+
|
428 |
+
)
|
429 |
+
|
430 |
|
431 |
ins = [fore, prompt, intensity, mode, refprompt, isrmbg]
|
432 |
generate_button.click(fn=process_generate, inputs=ins, outputs=[result_gallery])
|