swzamir commited on
Commit
c2af834
1 Parent(s): 0c1145c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -16
app.py CHANGED
@@ -5,27 +5,18 @@ import cv2
5
  import gradio as gr
6
  from PIL import Image
7
 
8
- os.system("pip install einops")
9
- os.system("git clone https://github.com/swz30/Restormer.git")
10
- shutil.copy("demo_gradio.py","Restormer/demo_gradio.py")
11
  os.chdir('Restormer')
12
 
13
- # Download pretrained models
14
- os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/real_denoising.pth -P Denoising/pretrained_models")
15
- os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/single_image_defocus_deblurring.pth -P Defocus_Deblurring/pretrained_models")
16
- os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/motion_deblurring.pth -P Motion_Deblurring/pretrained_models")
17
- os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/deraining.pth -P Deraining/pretrained_models")
18
-
19
  # Download sample images
20
- os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/sample_images.zip -P demo")
21
- shutil.unpack_archive('demo/sample_images.zip', 'demo/')
22
- os.remove('demo/sample_images.zip')
23
 
24
 
25
- examples = [['demo/sample_images/Real_Denoising/degraded/117355.png', 'Denoising'],
26
- ['demo/sample_images/Single_Image_Defocus_Deblurring/degraded/engagement.jpg', 'Defocus Deblurring'],
27
- ['demo/sample_images/Motion_Deblurring/degraded/GoPro-GOPR0854_11_00-000090-input.jpg','Motion Deblurring'],
28
- ['demo/sample_images/Deraining/degraded/Rain100H-77-input.jpg','Deraining']]
29
 
30
 
31
  title = "Restormer"
 
5
  import gradio as gr
6
  from PIL import Image
7
 
 
 
 
8
  os.chdir('Restormer')
9
 
 
 
 
 
 
 
10
  # Download sample images
11
+ os.system("wget https://github.com/swz30/Restormer/releases/download/v1.0/sample_images.zip")
12
+ shutil.unpack_archive('sample_images.zip')
13
+ os.remove('sample_images.zip')
14
 
15
 
16
+ examples = [['sample_images/Real_Denoising/degraded/117355.png', 'Denoising'],
17
+ ['sample_images/Single_Image_Defocus_Deblurring/degraded/engagement.jpg', 'Defocus Deblurring'],
18
+ ['sample_images/Motion_Deblurring/degraded/GoPro-GOPR0854_11_00-000090-input.jpg','Motion Deblurring'],
19
+ ['sample_images/Deraining/degraded/Rain100H-77-input.jpg','Deraining']]
20
 
21
 
22
  title = "Restormer"