Spaces:
Runtime error
Runtime error
File size: 613 Bytes
27e2096 0c9aebb 4f66e9b 27e2096 5905fa1 5576e0b 4816634 0c9aebb 27e2096 4c9978d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import os
import sys
os.system("mim install mmcv-full")
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"
gr.Interface(inference,gr.inputs.Image(type="pil"),gr.outputs.Image(type="file")).launch()
|