Trang Dang commited on
Commit
9d3accc
1 Parent(s): 9b2c5d8
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -126,8 +126,11 @@ def server(input: Inputs, output: Outputs, session: Session):
126
  @render.image
127
  def image():
128
  here = Path(__file__).parent
129
- img = {"src": input.image_input()[0]['datapath'], "width": "500px"}
130
- return img if img else None
 
 
 
131
 
132
 
133
  # "darkorange", "purple", "cyan4"
 
126
  @render.image
127
  def image():
128
  here = Path(__file__).parent
129
+ if input.image_input():
130
+ src = input.image_input()[0]['datapath']
131
+ img = {"src": src, "width": "500px"}
132
+ return img
133
+ return None
134
 
135
 
136
  # "darkorange", "purple", "cyan4"