|
@@ -8,15 +8,18 @@ import websockets
|
|
import json
|
|
import json
|
|
import threading
|
|
import threading
|
|
|
|
|
|
|
|
+
|
|
def car_classification(file_path):
|
|
def car_classification(file_path):
|
|
|
|
|
|
- car_dict = {0:"tank",
|
|
|
|
- 1:"zhuangjc",
|
|
|
|
- 2:"jiefc",
|
|
|
|
- 3:"lvdc",
|
|
|
|
- 4:"lunsc",
|
|
|
|
- 5:"daodc"}
|
|
|
|
- file_format = ["txt","npy","xls","wav","json"]
|
|
|
|
|
|
+ car_dict = {
|
|
|
|
+ 0: "tank",
|
|
|
|
+ 1: "zhuangjc",
|
|
|
|
+ 2: "jiefc",
|
|
|
|
+ 3: "lvdc",
|
|
|
|
+ 4: "lunsc",
|
|
|
|
+ 5: "daodc"
|
|
|
|
+ }
|
|
|
|
+ file_format = ["txt", "npy", "xls", "wav", "json"]
|
|
if file_path.split(".")[-1] in file_format:
|
|
if file_path.split(".")[-1] in file_format:
|
|
class_index = 0
|
|
class_index = 0
|
|
i = int(class_index)
|
|
i = int(class_index)
|
|
@@ -24,4 +27,4 @@ def car_classification(file_path):
|
|
status = True
|
|
status = True
|
|
else:
|
|
else:
|
|
status = False
|
|
status = False
|
|
- return(car_name,status)
|
|
|
|
|
|
+ return (status, car_name)
|