zhiweili commited on
Commit
6876e59
1 Parent(s): 4de1607

always save as png

Browse files
Files changed (2) hide show
  1. app_base.py +4 -4
  2. app_makeup.py +4 -4
app_base.py CHANGED
@@ -48,10 +48,10 @@ def create_demo() -> gr.Blocks:
48
  tmpPrefix = "/tmp/gradio/"
49
 
50
  extension = 'png'
51
- if enhanced_image.mode == 'RGBA':
52
- extension = 'png'
53
- else:
54
- extension = 'jpg'
55
 
56
  targetDir = f"{tmpPrefix}output/"
57
  if not os.path.exists(targetDir):
 
48
  tmpPrefix = "/tmp/gradio/"
49
 
50
  extension = 'png'
51
+ # if enhanced_image.mode == 'RGBA':
52
+ # extension = 'png'
53
+ # else:
54
+ # extension = 'jpg'
55
 
56
  targetDir = f"{tmpPrefix}output/"
57
  if not os.path.exists(targetDir):
app_makeup.py CHANGED
@@ -59,10 +59,10 @@ def create_demo() -> gr.Blocks:
59
  tmpPrefix = "/tmp/gradio/"
60
 
61
  extension = 'png'
62
- if enhanced_image.mode == 'RGBA':
63
- extension = 'png'
64
- else:
65
- extension = 'jpg'
66
 
67
  targetDir = f"{tmpPrefix}output/"
68
  if not os.path.exists(targetDir):
 
59
  tmpPrefix = "/tmp/gradio/"
60
 
61
  extension = 'png'
62
+ # if enhanced_image.mode == 'RGBA':
63
+ # extension = 'png'
64
+ # else:
65
+ # extension = 'jpg'
66
 
67
  targetDir = f"{tmpPrefix}output/"
68
  if not os.path.exists(targetDir):