Xu Ma commited on
Commit
c1b896a
1 Parent(s): be11144

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -7,6 +7,7 @@ import gradio as gr
7
  import torch
8
  import yaml
9
  from PIL import Image
 
10
 
11
  ROOT_PATH = sys.path[0] # 根目录
12
 
@@ -127,6 +128,15 @@ def yolo_det(img, experiment_id, device=None, model_name=None, inference_size=No
127
  return det_img, det_json
128
 
129
 
 
 
 
 
 
 
 
 
 
130
 
131
 
132
 
 
7
  import torch
8
  import yaml
9
  from PIL import Image
10
+ from subprocess import call
11
 
12
  ROOT_PATH = sys.path[0] # 根目录
13
 
 
128
  return det_img, det_json
129
 
130
 
131
+ def run_cmd(command):
132
+ try:
133
+ print(command)
134
+ call(command, shell=True)
135
+ except KeyboardInterrupt:
136
+ print("Process interrupted")
137
+ sys.exit(1)
138
+
139
+ run_cmd("gcc --version")
140
 
141
 
142