Spaces:
Running
Running
Commit ·
2032f41
1
Parent(s): a7ab477
Set RGBA as the default format of input images.
Browse files- app.py +1 -1
- app_local.py +1 -1
app.py
CHANGED
|
@@ -318,7 +318,7 @@ descriptions = ('Upload a picture, our model will extract a highly accurate segm
|
|
| 318 |
tab_image = gr.Interface(
|
| 319 |
fn=predict,
|
| 320 |
inputs=[
|
| 321 |
-
gr.Image(label='Upload an image'),
|
| 322 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 323 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 324 |
],
|
|
|
|
| 318 |
tab_image = gr.Interface(
|
| 319 |
fn=predict,
|
| 320 |
inputs=[
|
| 321 |
+
gr.Image(label='Upload an image', image_mode='RGBA'), # Keep alpha channel
|
| 322 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 323 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 324 |
],
|
app_local.py
CHANGED
|
@@ -313,7 +313,7 @@ descriptions = ('Upload a picture, our model will extract a highly accurate segm
|
|
| 313 |
tab_image = gr.Interface(
|
| 314 |
fn=predict,
|
| 315 |
inputs=[
|
| 316 |
-
gr.Image(label='Upload an image'),
|
| 317 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 318 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 319 |
],
|
|
|
|
| 313 |
tab_image = gr.Interface(
|
| 314 |
fn=predict,
|
| 315 |
inputs=[
|
| 316 |
+
gr.Image(label='Upload an image', image_mode='RGBA'), # Keep alpha channel
|
| 317 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 318 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 319 |
],
|