From 224712583a0cb93a5c0c4cbb136e29b6e8060bee Mon Sep 17 00:00:00 2001 From: Rick Izzo Date: Thu, 17 Nov 2022 18:14:31 +0100 Subject: [PATCH] updates --- src/lightning_app/components/serve/python_server.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lightning_app/components/serve/python_server.py b/src/lightning_app/components/serve/python_server.py index 9cdf73bfb7446..f0361f9db5046 100644 --- a/src/lightning_app/components/serve/python_server.py +++ b/src/lightning_app/components/serve/python_server.py @@ -1,6 +1,5 @@ import abc import base64 -import os from pathlib import Path from typing import Any, Dict, Optional @@ -28,8 +27,7 @@ class Image(BaseModel): @staticmethod def _get_sample_data() -> Dict[Any, Any]: - name = "lightning" + "_" + "app" - imagepath = Path(__file__.replace(f"lightning{os.sep}app", name)).absolute().parent / "catimage.png" + imagepath = Path(__file__).parent / "catimage.png" with open(imagepath, "rb") as image_file: encoded_string = base64.b64encode(image_file.read()) return {"image": encoded_string.decode("UTF-8")}