Spaces:
Build error
Build error
Update app.py
Browse files152 unmodified lines153154155156157158159159160161161162163164165152 unmodified lines # Optionally enhance the brightness slightly if the image is still too dark brightness_enhancer = ImageEnhance.Brightness(output_img) output_img = brightness_enhancer.enhance(1.0) # Keep brightness the same, adjust if needed
# 将图像存储为字节流 img_byte_arr = BytesIO() output_img.save(img_byte_arr, format='PNG') img_byte_arr.seek(0) img_byte_arr.seek(0) # 重新定位到流的开始
return img_byte_arr return img_byte_arr.getvalue() # 返回字节内容,而非 BytesIO 对象
# 📝 Title for the Gradio interfaceapp.py+3-2