Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,7 +75,10 @@ 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 |
-
|
|
|
|
|
|
|
|
|
|
| 79 |
width, height = outp_bg.size
|
| 80 |
rat = width/height
|
| 81 |
if width > height:
|
|
@@ -86,7 +89,6 @@ def star_fn(inp):
|
|
| 86 |
outp = outp.resize((24,24))
|
| 87 |
outp.save(f"{uid}_star.png")
|
| 88 |
out = os.path.abspath(f"{uid}_star.png")
|
| 89 |
-
#out = os.path.abspath(outp)
|
| 90 |
out_url = f'https://omnibus-game-test.hf.space/file={out}'
|
| 91 |
return output[0],out_url
|
| 92 |
|
|
|
|
| 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 |
+
out = os.path.abspath(f"{uid}_pre_star.png")
|
| 80 |
+
out_pre_url = f'https://omnibus-game-test.hf.space/file={out}'
|
| 81 |
+
outp_bg=bg1(out_pre_url)
|
| 82 |
width, height = outp_bg.size
|
| 83 |
rat = width/height
|
| 84 |
if width > height:
|
|
|
|
| 89 |
outp = outp.resize((24,24))
|
| 90 |
outp.save(f"{uid}_star.png")
|
| 91 |
out = os.path.abspath(f"{uid}_star.png")
|
|
|
|
| 92 |
out_url = f'https://omnibus-game-test.hf.space/file={out}'
|
| 93 |
return output[0],out_url
|
| 94 |
|