Skip to content

Commit ee517f3

Browse files
authored
Fix catimage import (#15712)
1 parent f57160b commit ee517f3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lightning_app/components/serve/python_server.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import abc
22
import base64
3-
import os
43
from pathlib import Path
54
from typing import Any, Dict, Optional
65

@@ -28,8 +27,7 @@ class Image(BaseModel):
2827

2928
@staticmethod
3029
def _get_sample_data() -> Dict[Any, Any]:
31-
name = "lightning" + "_" + "app"
32-
imagepath = Path(__file__.replace(f"lightning{os.sep}app", name)).absolute().parent / "catimage.png"
30+
imagepath = Path(__file__).parent / "catimage.png"
3331
with open(imagepath, "rb") as image_file:
3432
encoded_string = base64.b64encode(image_file.read())
3533
return {"image": encoded_string.decode("UTF-8")}

0 commit comments

Comments
 (0)