Eun0 commited on
Commit
68387e1
1 Parent(s): eca463e

First init :tada:

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import gradio as gr
3
+
4
+
5
+ def get_png_info(image):
6
+ return image.info
7
+
8
+ with gr.Blocks() as demo:
9
+ gr.Markdown(
10
+ '''
11
+ # 📚 Read Png Info
12
+ Read meta data of Image
13
+ '''
14
+ )
15
+ with gr.Row():
16
+ with gr.Column():
17
+ image = gr.Image(interactive=True, type="pil")
18
+ btn_submit = gr.Button()
19
+ info_dict = gr.JSON()
20
+
21
+ btn_submit.click(
22
+ fn=get_png_info,
23
+ inputs=[image],
24
+ outputs=[info_dict],
25
+ )
26
+
27
+ demo.launch()