Siwon123 commited on
Commit
1b25c42
·
1 Parent(s): 0b9d903

change app,py

Browse files
Files changed (2) hide show
  1. app.py +22 -21
  2. 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
- def main():
9
- title = "🖼️ ICDR 🖼️"
10
- description = ''' ## ICDR: Image Restoration Framework for Composite Degradation following Human Instructions
11
- Our Github : https://github.com/
12
 
13
- Siwon Kim, Donghyeon Yoon
14
 
15
- Ajou Univ
16
- '''
17
 
18
 
19
- article = "<p style='text-align: center'><a href='https://github.com/' target='_blank'>ICDR</a></p>"
20
 
21
- #### Image,Prompts examples
22
- examples = [['input/00010.png', "I love this photo, could you remove the haze and more brighter?"],
23
- ['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!"]]
24
 
25
- css = """
26
- .image-frame img, .image-container img {
27
- width: auto;
28
- height: auto;
29
- max-width: none;
30
- }
31
- """
32
 
33
 
34
- demo = gr.Interface(
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
- demo.launch(share=True)
 
 
 
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