File size: 1,357 Bytes
27e2096
0c9aebb
2222162
6f39134
27e2096
5905fa1
5576e0b
4816634
0c9aebb
27e2096
 
 
 
 
 
 
cf7f0df
 
 
 
 
546c80f
cf7f0df
4a60347
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os
import sys
os.system("pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10/index.html")
os.system("pip install mmedit")
os.system("git clone https://github.com/ckkelvinchan/RealBasicVSR.git")
os.chdir("RealBasicVSR")
import gradio as gr
os.system("wget https://huggingface.co/akhaliq/RealBasicVSR_x4/resolve/main/RealBasicVSR_x4.pth")
sys.path.append("RealBasicVSR")

os.mkdir("test")
def inference(img):
 img.save("test/test.png")
 os.system("python inference_realbasicvsr.py configs/realbasicvsr_x4.py RealBasicVSR_x4.pth test/ results/demo_000")
 return "results/demo_000/test.png"

title="RealBasicVSR"
description="Gradio demo for Investigating Tradeoffs in Real-World Video Super-Resolution. To use it, simply upload your image or click on one of the examples to load them. Read more at the links below."

article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.12704' target='_blank'>Investigating Tradeoffs in Real-World Video Super-Resolution</a> | <a href='https://github.com/ckkelvinchan/realbasicvsr' target='_blank'>Github Repo</a></p>"

examples=[['/home/user/app/RealBasicVSR/bear.jpeg']]

gr.Interface(inference,gr.inputs.Image(type="pil",shape=(256,256)),gr.outputs.Image(type="file"),title=title,description=description,article=article,examples=examples).launch(enable_queue=True)