Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
21 |
-
shutil.unpack_archive('
|
22 |
-
os.remove('
|
23 |
|
24 |
|
25 |
-
examples = [['
|
26 |
-
['
|
27 |
-
['
|
28 |
-
['
|
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"
|