Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,6 +30,25 @@ label_path = Path(image_path,'labels')
|
|
| 30 |
weight_path = Path(model_path,'best_Yolo_v7.pt')
|
| 31 |
print(f'\nworking directory: {os.getcwd()}\n')
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
"""# load MobileNet model"""
|
| 34 |
|
| 35 |
MobileNet_model = keras.models.load_model(Path(model_path,'MobileNetV3Large_Genus_5th_fold_model'))
|
|
|
|
| 30 |
weight_path = Path(model_path,'best_Yolo_v7.pt')
|
| 31 |
print(f'\nworking directory: {os.getcwd()}\n')
|
| 32 |
|
| 33 |
+
|
| 34 |
+
import os
|
| 35 |
+
|
| 36 |
+
# 指定工作目录
|
| 37 |
+
working_directory = '/home/user/app'
|
| 38 |
+
|
| 39 |
+
# 列出工作目录中的所有条目
|
| 40 |
+
all_entries = os.listdir(working_directory)
|
| 41 |
+
|
| 42 |
+
# 过滤出所有的目录
|
| 43 |
+
all_directories = [entry for entry in all_entries if os.path.isdir(os.path.join(working_directory, entry))]
|
| 44 |
+
|
| 45 |
+
# 打印所有的目录
|
| 46 |
+
print("所有的目录:")
|
| 47 |
+
for directory in all_directories:
|
| 48 |
+
print(directory)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
"""# load MobileNet model"""
|
| 53 |
|
| 54 |
MobileNet_model = keras.models.load_model(Path(model_path,'MobileNetV3Large_Genus_5th_fold_model'))
|