chulanpro5 commited on
Commit
1dc498e
·
1 Parent(s): 44e58c2

update: change image format

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -23,6 +23,10 @@ def run_fontdiffuer(source_image,
23
  pipe=pipe,
24
  content_image=source_image,
25
  style_image=reference_image)
 
 
 
 
26
  return out_image
27
 
28
 
@@ -77,7 +81,7 @@ if __name__ == '__main__':
77
  with gr.Row():
78
  character = gr.Textbox(value='隆', label='[Option 2] Source Character')
79
  with gr.Row():
80
- fontdiffuer_output_image = gr.Image(height=200, label="FontDiffuser Output Image", image_mode='RGB', type='pil')
81
 
82
  sampling_step = gr.Slider(20, 50, value=20, step=10,
83
  label="Sampling Step", info="The sampling step by FontDiffuser.")
 
23
  pipe=pipe,
24
  content_image=source_image,
25
  style_image=reference_image)
26
+
27
+ if out_image is not None:
28
+ out_image.format = 'PNG'
29
+
30
  return out_image
31
 
32
 
 
81
  with gr.Row():
82
  character = gr.Textbox(value='隆', label='[Option 2] Source Character')
83
  with gr.Row():
84
+ fontdiffuer_output_image = gr.Image(height=200, label="FontDiffuser Output Image", image_mode='RGB', type='pil', format='png')
85
 
86
  sampling_step = gr.Slider(20, 50, value=20, step=10,
87
  label="Sampling Step", info="The sampling step by FontDiffuser.")