aagoluoglu commited on
Commit
b58ea84
·
verified ·
1 Parent(s): cb0dd04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -67,7 +67,11 @@ def server(input: Inputs, output: Outputs, session: Session):
67
  @render.ui
68
  def uploaded_image():
69
  """Displays the uploaded image"""
70
- return ui.tags.img(src=uploaded_image_path(), style={"max-width": "100%"})
 
 
 
 
71
 
72
  @reactive.Calc
73
  def filtered_df() -> pd.DataFrame:
 
67
  @render.ui
68
  def uploaded_image():
69
  """Displays the uploaded image"""
70
+ img_src = uploaded_image_path()
71
+ if img_src:
72
+ return ui.tags.img(src=str(img_src), style={"max-width": "100%"})
73
+ else:
74
+ return "" # Return an empty string if no image is uploaded
75
 
76
  @reactive.Calc
77
  def filtered_df() -> pd.DataFrame: