Spaces:
Running
Running
Andrei Zhytkevich
commited on
Commit
β’
6b42aaf
1
Parent(s):
3e55086
fix readme, add outputs
Browse files
README.md
CHANGED
@@ -1,11 +1,31 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
This is Gradio project for reading and displaying an image and its metadata from url.
|
3 |
|
4 |
-
##
|
5 |
-
|
|
|
|
|
|
|
|
|
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", "
|
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()
|