Ahsen Khaliq commited on
Commit
8969b51
1 Parent(s): e1bd448

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -4,10 +4,11 @@ os.system("pip3 install cython_bbox gdown 'git+https://github.com/cocodataset/co
4
  os.system("pip3 install -v -e .")
5
  os.system("gdown https://drive.google.com/uc?id=1RE5vaKHYt_TL0cXNn6FmjO7aZx3sVfVA")
6
 
7
- def inference(video):
8
- os.system("python onnx_inference.py -i "+video)
9
- os.system("ls .")
10
- return "*.mp4"
 
11
 
12
 
13
  title = "Anime2Sketch"
@@ -16,8 +17,8 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.057
16
 
17
  gr.Interface(
18
  inference,
19
- "video",
20
- "playable_video",
21
  title=title,
22
  description=description,
23
  article=article,
 
4
  os.system("pip3 install -v -e .")
5
  os.system("gdown https://drive.google.com/uc?id=1RE5vaKHYt_TL0cXNn6FmjO7aZx3sVfVA")
6
 
7
+ def inference(image):
8
+ os.system("python3 tools/demo_track.py image -f exps/example/mot/yolox_x_mix_det.py -c ./bytetrack_x_mot17.pth.tar --save_result --device 'cpu' --path "+image.name)
9
+ #os.system("python onnx_inference.py -i "+video)
10
+ #os.system("ls .")
11
+ return image.name
12
 
13
 
14
  title = "Anime2Sketch"
 
17
 
18
  gr.Interface(
19
  inference,
20
+ gr.inputs.Image(type="file"),
21
+ gr.outputs.Image(type="file"),
22
  title=title,
23
  description=description,
24
  article=article,