Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
from PIL import Image
|
5 |
import uuid
|
6 |
import random
|
7 |
-
|
8 |
proc1=diff
|
9 |
proc2=diff
|
10 |
bg1=gr.Interface.load("spaces/Omnibus/fast-bg-remove-mod")
|
@@ -75,13 +75,13 @@ def star_fn(inp):
|
|
75 |
#in_url=f'https://omnibus-fast-diff.hf.space/file={output[0]}'
|
76 |
|
77 |
outp=Image.open(output[0])
|
78 |
-
outp.save(f"{uid}_pre_star.png")
|
79 |
|
80 |
-
out = os.path.abspath(f"{uid}_pre_star.png")
|
81 |
-
out_pre_url = f'https://omnibus-game-test.hf.space/file={out}'
|
82 |
#print(out_pre_url)
|
83 |
|
84 |
-
outp_bg=
|
85 |
|
86 |
bg_im=Image.open(outp_bg)
|
87 |
print(f'outp_bg:: {outp_bg}')
|
|
|
4 |
from PIL import Image
|
5 |
import uuid
|
6 |
import random
|
7 |
+
import bg
|
8 |
proc1=diff
|
9 |
proc2=diff
|
10 |
bg1=gr.Interface.load("spaces/Omnibus/fast-bg-remove-mod")
|
|
|
75 |
#in_url=f'https://omnibus-fast-diff.hf.space/file={output[0]}'
|
76 |
|
77 |
outp=Image.open(output[0])
|
78 |
+
#outp.save(f"{uid}_pre_star.png")
|
79 |
|
80 |
+
#out = os.path.abspath(f"{uid}_pre_star.png")
|
81 |
+
#out_pre_url = f'https://omnibus-game-test.hf.space/file={out}'
|
82 |
#print(out_pre_url)
|
83 |
|
84 |
+
outp_bg=bg.rem_bg(outp)
|
85 |
|
86 |
bg_im=Image.open(outp_bg)
|
87 |
print(f'outp_bg:: {outp_bg}')
|