Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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"))
|