Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -215,7 +215,7 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
215 |
image, prob, prediction = get_predictions()
|
216 |
|
217 |
# Check if there are no predictions (i.e., no uploaded image)
|
218 |
-
if
|
219 |
# Return a placeholder plot or message
|
220 |
fig, ax = plt.subplots()
|
221 |
ax.text(0.5, 0.5, "Upload an image to see predictions", fontsize=12, ha="center")
|
|
|
215 |
image, prob, prediction = get_predictions()
|
216 |
|
217 |
# Check if there are no predictions (i.e., no uploaded image)
|
218 |
+
if image is None or prob is None or prediction is None:
|
219 |
# Return a placeholder plot or message
|
220 |
fig, ax = plt.subplots()
|
221 |
ax.text(0.5, 0.5, "Upload an image to see predictions", fontsize=12, ha="center")
|