hong-xl commited on
Commit
42d3cd3
·
1 Parent(s): 76997e6

update application file

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ def create_html_page(input_image):
21
  draw.text((0, image.height), text, fill=color)
22
  # 将带有图片和文本的 HTML 页面返回
23
  output_html = '<img src="data:image/png;base64,{}">'.format(
24
- io.BytesIO(input_image).getvalue().encode('base64').decode())
25
  output_html += '<p>{}</p>'.format(text)
26
  return output_html
27
 
 
21
  draw.text((0, image.height), text, fill=color)
22
  # 将带有图片和文本的 HTML 页面返回
23
  output_html = '<img src="data:image/png;base64,{}">'.format(
24
+ image.getvalue().encode('base64').decode())
25
  output_html += '<p>{}</p>'.format(text)
26
  return output_html
27