change app,py
Browse files- app.py +22 -21
- install.sh +0 -0
app.py
CHANGED
@@ -5,33 +5,32 @@ def greet(image, prompt):
|
|
5 |
restore_img = infer(img=image, text_prompt=prompt)
|
6 |
return restore_img
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
Our Github : https://github.com/
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
|
34 |
-
|
35 |
fn=greet,
|
36 |
inputs=[gr.Image(type="pil", label="Input"),
|
37 |
gr.Text(label="Prompt") ],
|
@@ -41,5 +40,7 @@ def main():
|
|
41 |
article=article,
|
42 |
examples=examples,
|
43 |
css=css,
|
44 |
-
|
45 |
-
|
|
|
|
|
|
5 |
restore_img = infer(img=image, text_prompt=prompt)
|
6 |
return restore_img
|
7 |
|
8 |
+
title = "🖼️ ICDR 🖼️"
|
9 |
+
description = ''' ## ICDR: Image Restoration Framework for Composite Degradation following Human Instructions
|
10 |
+
Our Github : https://github.com/
|
|
|
11 |
|
12 |
+
Siwon Kim, Donghyeon Yoon
|
13 |
|
14 |
+
Ajou Univ
|
15 |
+
'''
|
16 |
|
17 |
|
18 |
+
article = "<p style='text-align: center'><a href='https://github.com/' target='_blank'>ICDR</a></p>"
|
19 |
|
20 |
+
#### Image,Prompts examples
|
21 |
+
examples = [['input/00010.png', "I love this photo, could you remove the haze and more brighter?"],
|
22 |
+
['input/00058.png', "I have to post an emotional shot on Instagram, but it was shot too foggy and too dark. Change it like a sunny day and brighten it up!"]]
|
23 |
|
24 |
+
css = """
|
25 |
+
.image-frame img, .image-container img {
|
26 |
+
width: auto;
|
27 |
+
height: auto;
|
28 |
+
max-width: none;
|
29 |
+
}
|
30 |
+
"""
|
31 |
|
32 |
|
33 |
+
demo = gr.Interface(
|
34 |
fn=greet,
|
35 |
inputs=[gr.Image(type="pil", label="Input"),
|
36 |
gr.Text(label="Prompt") ],
|
|
|
40 |
article=article,
|
41 |
examples=examples,
|
42 |
css=css,
|
43 |
+
)
|
44 |
+
|
45 |
+
if __name__ == "__main__":
|
46 |
+
demo.launch()
|
install.sh
CHANGED
File without changes
|