Spaces:
Running
on
Zero
Running
on
Zero
Switch to Spaces.GPU
Browse files- hugging_face/app.py +2 -0
- requirements.txt +1 -0
hugging_face/app.py
CHANGED
@@ -16,6 +16,7 @@ from basicsr.utils.video_util import VideoReader, VideoWriter
|
|
16 |
from basicsr.utils.registry import ARCH_REGISTRY
|
17 |
import gradio as gr
|
18 |
from torch.hub import download_url_to_file
|
|
|
19 |
|
20 |
title = r"""<h1 align="center">KEEP: Kalman-Inspired Feature Propagation for Video Face Super-Resolution</h1>"""
|
21 |
|
@@ -77,6 +78,7 @@ def set_realesrgan():
|
|
77 |
warnings.warn('Running on CPU now! Make sure your PyTorch version matches your CUDA. The unoptimized RealESRGAN is slow on CPU.', category=RuntimeWarning)
|
78 |
return upsampler
|
79 |
|
|
|
80 |
def process_video(input_video, draw_box, bg_enhancement):
|
81 |
device = get_device()
|
82 |
args = argparse.Namespace(
|
|
|
16 |
from basicsr.utils.registry import ARCH_REGISTRY
|
17 |
import gradio as gr
|
18 |
from torch.hub import download_url_to_file
|
19 |
+
import spaces
|
20 |
|
21 |
title = r"""<h1 align="center">KEEP: Kalman-Inspired Feature Propagation for Video Face Super-Resolution</h1>"""
|
22 |
|
|
|
78 |
warnings.warn('Running on CPU now! Make sure your PyTorch version matches your CUDA. The unoptimized RealESRGAN is slow on CPU.', category=RuntimeWarning)
|
79 |
return upsampler
|
80 |
|
81 |
+
@spaces.GPU(duration=300)
|
82 |
def process_video(input_video, draw_box, bg_enhancement):
|
83 |
device = get_device()
|
84 |
args = argparse.Namespace(
|
requirements.txt
CHANGED
@@ -19,3 +19,4 @@ huggingface_hub==0.25.1
|
|
19 |
pydantic==2.10.6
|
20 |
ffmpeg-python==0.2.0
|
21 |
av
|
|
|
|
19 |
pydantic==2.10.6
|
20 |
ffmpeg-python==0.2.0
|
21 |
av
|
22 |
+
spaces
|