akhaliq HF staff commited on
Commit
27e2096
1 Parent(s): 5a3926f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ os.system("git clone https://github.com/ckkelvinchan/RealBasicVSR.git")
3
+ os.system("RealBasicVSR")
4
+ import gradio
5
+
6
+ os.mkdir("test")
7
+ def inference(img):
8
+ img.save("test/test.png")
9
+ os.system("python inference_realbasicvsr.py configs/realbasicvsr_x4.py RealBasicVSR_x4.pth test/ results/demo_000")
10
+ return "results/demo_000/test.png"
11
+
12
+ gr.Interface(inference,gr.inputs.Image(type="pil"),gr.outputs.Image(type="file"))