Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
import cv2
|
9 |
import os
|
10 |
|
11 |
-
weight_path = r'
|
12 |
model = load_model(weight_path)
|
13 |
|
14 |
labels=['天气:小雨, 降雨强度(mm/min):0.8, 能见度(m):500, 道路摩擦系数:0.64, 限速(km/h):80',
|
@@ -30,6 +30,6 @@ def classify_image(inp):
|
|
30 |
fn=classify_image,
|
31 |
inputs=gr.Image(type="pil",shape=(256,256)),
|
32 |
outputs=gr.Label(num_top_classes=1),
|
33 |
-
examples=["
|
34 |
interpretation="default",cache_examples=True,title="恶劣天气图像识别与预警"
|
35 |
).launch(enable_queue=True)
|
|
|
8 |
import cv2
|
9 |
import os
|
10 |
|
11 |
+
weight_path = r'basic.h5' #权重文件
|
12 |
model = load_model(weight_path)
|
13 |
|
14 |
labels=['天气:小雨, 降雨强度(mm/min):0.8, 能见度(m):500, 道路摩擦系数:0.64, 限速(km/h):80',
|
|
|
30 |
fn=classify_image,
|
31 |
inputs=gr.Image(type="pil",shape=(256,256)),
|
32 |
outputs=gr.Label(num_top_classes=1),
|
33 |
+
examples=["sunny.jpg"],
|
34 |
interpretation="default",cache_examples=True,title="恶劣天气图像识别与预警"
|
35 |
).launch(enable_queue=True)
|