Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import os
|
2 |
-
|
3 |
import cv2
|
4 |
import gradio as gr
|
5 |
import torch
|
6 |
from basicsr.archs.srvgg_arch import SRVGGNetCompact
|
7 |
from gfpgan.utils import GFPGANer
|
8 |
from realesrgan.utils import RealESRGANer
|
|
|
9 |
|
10 |
os.system("pip freeze")
|
11 |
# download weights
|
@@ -45,6 +45,7 @@ os.makedirs('output', exist_ok=True)
|
|
45 |
|
46 |
|
47 |
# def inference(img, version, scale, weight):
|
|
|
48 |
def inference(img, version, scale):
|
49 |
# weight /= 100
|
50 |
print(img, version, scale)
|
|
|
1 |
import os
|
|
|
2 |
import cv2
|
3 |
import gradio as gr
|
4 |
import torch
|
5 |
from basicsr.archs.srvgg_arch import SRVGGNetCompact
|
6 |
from gfpgan.utils import GFPGANer
|
7 |
from realesrgan.utils import RealESRGANer
|
8 |
+
import spaces
|
9 |
|
10 |
os.system("pip freeze")
|
11 |
# download weights
|
|
|
45 |
|
46 |
|
47 |
# def inference(img, version, scale, weight):
|
48 |
+
@spaces.GPU(duration=90)
|
49 |
def inference(img, version, scale):
|
50 |
# weight /= 100
|
51 |
print(img, version, scale)
|