Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,14 +4,14 @@ from pathlib import Path
|
|
| 4 |
|
| 5 |
proj_dir1 = Path.cwd()
|
| 6 |
print(f"proj_dir1 -- {proj_dir1}")
|
| 7 |
-
tmp1 = str(proj_dir1 / 'media' / '
|
| 8 |
print(f"string1 -- {tmp1}")
|
| 9 |
|
| 10 |
-
|
| 11 |
-
print(f"proj_dir -- {
|
| 12 |
-
tmp = str(
|
| 13 |
print(f"string -- {tmp}")
|
| 14 |
-
|
| 15 |
with gr.Blocks() as demo:
|
| 16 |
img = gr.Image(value= tmp, type='filepath')
|
| 17 |
img = gr.Image(value= tmp1, type='filepath')
|
|
|
|
| 4 |
|
| 5 |
proj_dir1 = Path.cwd()
|
| 6 |
print(f"proj_dir1 -- {proj_dir1}")
|
| 7 |
+
tmp1 = str(proj_dir1 / 'media' / 'banner.png')
|
| 8 |
print(f"string1 -- {tmp1}")
|
| 9 |
|
| 10 |
+
proj_dir2 = Path(__file__).parent
|
| 11 |
+
print(f"proj_dir -- {proj_dir2}")
|
| 12 |
+
tmp = str(proj_dir2 / 'media' / 'banner.png')
|
| 13 |
print(f"string -- {tmp}")
|
| 14 |
+
print(f"Path(__file__) - {Path(__file__)}")
|
| 15 |
with gr.Blocks() as demo:
|
| 16 |
img = gr.Image(value= tmp, type='filepath')
|
| 17 |
img = gr.Image(value= tmp1, type='filepath')
|