Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import subprocess
|
3 |
import os
|
4 |
import time
|
|
|
5 |
|
6 |
# 获取third_party文件夹的绝对路径
|
7 |
#third_party_path = os.path.abspath('./third_party/')
|
@@ -13,6 +14,7 @@ os.system(f"chmod a+x {BIN}")
|
|
13 |
os.system(f"{BIN} -h")
|
14 |
# os.system("ldd ./yolov5s-tt100k-static.bin")
|
15 |
def run_yolov5s(image_filepath):
|
|
|
16 |
start_time = time.time()
|
17 |
result = subprocess.run([BIN, "-m", "./yolov5s_tt100k_opt_fp32.tmfile", "-i", image_filepath], capture_output=True, text=True)
|
18 |
elapsed_time = time.time() - start_time
|
|
|
2 |
import subprocess
|
3 |
import os
|
4 |
import time
|
5 |
+
import datetime
|
6 |
|
7 |
# 获取third_party文件夹的绝对路径
|
8 |
#third_party_path = os.path.abspath('./third_party/')
|
|
|
14 |
os.system(f"{BIN} -h")
|
15 |
# os.system("ldd ./yolov5s-tt100k-static.bin")
|
16 |
def run_yolov5s(image_filepath):
|
17 |
+
print(datetime.datetime.utcnow())
|
18 |
start_time = time.time()
|
19 |
result = subprocess.run([BIN, "-m", "./yolov5s_tt100k_opt_fp32.tmfile", "-i", image_filepath], capture_output=True, text=True)
|
20 |
elapsed_time = time.time() - start_time
|