Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,22 +63,22 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
63 |
else:
|
64 |
return "" # No image uploaded
|
65 |
|
66 |
-
# @output
|
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 |
@output
|
77 |
-
@render.
|
78 |
def uploaded_image():
|
|
|
79 |
img_src = uploaded_image_path()
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
@reactive.Calc
|
84 |
def filtered_df() -> pd.DataFrame:
|
|
|
63 |
else:
|
64 |
return "" # No image uploaded
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
@output
|
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 |
+
# @output
|
77 |
+
# @render.image
|
78 |
+
# def uploaded_image():
|
79 |
+
# img_src = uploaded_image_path()
|
80 |
+
# img: ImgData = {"src": img_src, "width": "100px"}
|
81 |
+
# return img
|
82 |
|
83 |
@reactive.Calc
|
84 |
def filtered_df() -> pd.DataFrame:
|