Spaces:
Build error
Build error
Update app.py
Browse files152 unmodified lines153154155156157158159160161162163164152 unmodified lines# Optionally enhance the brightness slightly if the image is still too darkbrightness_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)return img_byte_arr# 📝 Title for the Gradio interface152 unmodified lines153154155156157158159160161162163164165152 unmodified lines# Optionally enhance the brightness slightly if the image is still too darkbrightness_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) # 重新定位到流的开始return img_byte_arr.getvalue() # 返回字节内容,而非 BytesIO 对象# 📝 Title for the Gradio interface
app.py+3-2