lunde commited on
Commit
5ae48fc
1 Parent(s): a768299

Convert to RGB to not fail on alpha-channels

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -32,14 +32,13 @@ def fix_lowlight(image: Image.Image) -> Image.Image:
32
 
33
  return im
34
 
35
-
36
  def main():
37
  st.title("Lowlight Enhancement")
38
  st.write("This is a simple lowlight enhancement app with great performance and does not require paired images to train.")
39
  st.write("The model runs at 1000/11 FPS on single GPU/CPU on images with a size of 1200*900*3")
40
  uploaded_file = st.file_uploader("Lowlight Image")
41
  if uploaded_file:
42
- data_lowlight = Image.open(uploaded_file)
43
  col1, col2 = st.columns(2)
44
  col1.write("Original (Lowlight)")
45
  col1.image(data_lowlight, caption="Lowlight Image", use_column_width=True)
32
 
33
  return im
34
 
 
35
  def main():
36
  st.title("Lowlight Enhancement")
37
  st.write("This is a simple lowlight enhancement app with great performance and does not require paired images to train.")
38
  st.write("The model runs at 1000/11 FPS on single GPU/CPU on images with a size of 1200*900*3")
39
  uploaded_file = st.file_uploader("Lowlight Image")
40
  if uploaded_file:
41
+ data_lowlight = Image.open(uploaded_file).convert('RGB')
42
  col1, col2 = st.columns(2)
43
  col1.write("Original (Lowlight)")
44
  col1.image(data_lowlight, caption="Lowlight Image", use_column_width=True)