File size: 1,135 Bytes
1b697ad
 
80c8d1e
640985c
5b9f07d
640985c
1d7a994
5b9f07d
1b697ad
f555b99
1b697ad
 
a4fe86a
c709c3d
 
1b697ad
 
 
 
 
 
 
 
 
 
 
 
a911b9a
 
1b697ad
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
26
27
28
29
30
import os
import gradio as gr
os.system("pip3 install cython_bbox gdown 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'")
#os.system("git clone https://github.com/Megvii-BaseDetection/YOLOX.git")
#os.chdir("yolox")
#os.system("pip3 install -r requirements.txt")
os.system("pip3 install -v -e .")
#os.chdir("..")
os.system("gdown https://drive.google.com/uc?id=1RE5vaKHYt_TL0cXNn6FmjO7aZx3sVfVA")


def inference(video):
  os.system("python onnx_inference.py -i "+video)
  os.system("ls demo_output/")
  return "demo_output/*.mp4"
  

title = "Anime2Sketch"
description = "demo for Anime2Sketch. To use it, simply upload your image, or click 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/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"

gr.Interface(
    inference, 
    "video", 
    "playable_video",
    title=title,
    description=description,
    article=article,
    enable_queue=True
    ).launch(debug=True)