Spaces:
Running
Running
tori29umai
commited on
Commit
β’
245de5e
1
Parent(s):
6e9b1b6
Update
Browse files
app.py
CHANGED
@@ -162,7 +162,9 @@ class webui:
|
|
162 |
self.demo = gr.Blocks()
|
163 |
|
164 |
def main(self, image_path):
|
165 |
-
image = Image.open(image_path)
|
|
|
|
|
166 |
#ζ‘εΌ΅εγεγι€γγγγ‘γ€γ«εγεεΎ
|
167 |
image_name = os.path.splitext(image_path)[0]
|
168 |
alpha = image.getchannel('A') if image.mode == 'RGBA' else None
|
|
|
162 |
self.demo = gr.Blocks()
|
163 |
|
164 |
def main(self, image_path):
|
165 |
+
image = Image.open(image_path)
|
166 |
+
if image.mode != 'RGBA':
|
167 |
+
image = image.convert('RGBA')
|
168 |
#ζ‘εΌ΅εγεγι€γγγγ‘γ€γ«εγεεΎ
|
169 |
image_name = os.path.splitext(image_path)[0]
|
170 |
alpha = image.getchannel('A') if image.mode == 'RGBA' else None
|