Andrei Zhytkevich commited on
Commit
6b42aaf
β€’
1 Parent(s): 3e55086

fix readme, add outputs

Browse files
Files changed (2) hide show
  1. README.md +23 -3
  2. app.py +2 -2
README.md CHANGED
@@ -1,11 +1,31 @@
1
- # png-params
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  This is Gradio project for reading and displaying an image and its metadata from url.
3
 
4
- ## Pre-requisites
5
- Python 3
 
 
 
 
6
 
7
  ## Running locally
8
 
 
 
 
9
  ### Install requirements
10
  ``` bash
11
  pip install -r requirements.txt
 
1
+ ---
2
+ title: Test Space
3
+ emoji: πŸš€
4
+ colorFrom: indigo
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 3.16.2
8
+ app_file: app.py
9
+ pinned: false
10
+ license: wtfpl
11
+ ---
12
+
13
+ # PNG Parameters Viewer (png-params)
14
+ [GitHub](https://github.com/andzhik/png-params)
15
  This is Gradio project for reading and displaying an image and its metadata from url.
16
 
17
+ ## Usage
18
+ - Copy image link;
19
+ - Paste it into the **url** field
20
+ - Submit
21
+
22
+ **Generation parameters** text can be directly used in AUTOMATIC1111 UI
23
 
24
  ## Running locally
25
 
26
+ ### Prerequisites
27
+ Python 3
28
+
29
  ### Install requirements
30
  ``` bash
31
  pip install -r requirements.txt
app.py CHANGED
@@ -14,7 +14,7 @@ def display_image_from_url(url):
14
  image = Image.open(res)
15
  image.load()
16
 
17
- return image, image.info
18
 
19
- server = gr.Interface(display_image_from_url, "text", ["image", "text"])
20
  server.launch()
 
14
  image = Image.open(res)
15
  image.load()
16
 
17
+ return image, image.info['parameters'], image.info
18
 
19
+ server = gr.Interface(display_image_from_url, "text", ["image", gr.Textbox(label="Generation Parameters"), gr.Textbox(label="Metadata")])
20
  server.launch()