Update app.py
Browse files
app.py
CHANGED
|
@@ -73,16 +73,16 @@ def star_fn(inp):
|
|
| 73 |
print(output)
|
| 74 |
outp=Image.open(output[0])
|
| 75 |
#outp.save(f"{uid}_star.png")
|
| 76 |
-
#outrs = outp.resize((24,24))
|
| 77 |
print("removing background")
|
| 78 |
out=rm(outp)
|
| 79 |
print("resizing")
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
return out,
|
| 86 |
|
| 87 |
with gr.Blocks() as app:
|
| 88 |
with gr.Row():
|
|
|
|
| 73 |
print(output)
|
| 74 |
outp=Image.open(output[0])
|
| 75 |
#outp.save(f"{uid}_star.png")
|
|
|
|
| 76 |
print("removing background")
|
| 77 |
out=rm(outp)
|
| 78 |
print("resizing")
|
| 79 |
+
outrs = out.resize((24,24))
|
| 80 |
|
| 81 |
+
outrs.save(f"{uid}_star.png")
|
| 82 |
+
out = os.path.abspath(f"{uid}_star.png")
|
| 83 |
+
out_url = f'https://omnibus-game-test.hf.space/file={out}'
|
| 84 |
|
| 85 |
+
return out,out_url
|
| 86 |
|
| 87 |
with gr.Blocks() as app:
|
| 88 |
with gr.Row():
|