File size: 510 Bytes
25a41e9
 
 
 
795c1e9
 
 
 
25a41e9
c77b7a4
25a41e9
82fdcdc
25a41e9
 
 
82fdcdc
795c1e9
 
25a41e9
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
import os
from pathlib import Path

proj_dir1 = Path.cwd()
print(f"proj_dir1 -- {proj_dir1}")
tmp = str(proj_dir1 / 'media' / 'media_reddit_scraper.drawio.png')
print(f"string1 -- {tmp}")

proj_dir = Path(__file__).parent
print(f"proj_dir -- {proj_dir}")
tmp = str(proj_dir / 'media' / 'media_reddit_scraper.drawio.png')
print(f"string -- {tmp}")

with gr.Blocks() as demo:
    img = gr.Image(value= tmp, type='filepath')
    img = gr.Image(value= tmp1, type='filepath')
    

demo.launch()