Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ os.makedirs(CAPTURED_FRAMES_DIR, exist_ok=True)
|
|
36 |
custom_theme = gr.themes.Soft(
|
37 |
primary_hue="red",
|
38 |
secondary_hue="green",
|
39 |
-
neutral_hue="gray",
|
40 |
text_size="lg",
|
41 |
radius_size="lg",
|
42 |
)
|
@@ -94,7 +94,7 @@ def monitor_feed():
|
|
94 |
crack_severity_all.pop(0)
|
95 |
|
96 |
frame = cv2.resize(last_frame, (800, 600))
|
97 |
-
cv2.putText(frame, f"Frame: {frame_count}", (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 0), 2)
|
98 |
cv2.putText(frame, f"{last_timestamp}", (20, 80), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 0), 2)
|
99 |
|
100 |
map_path = generate_map(gps_coordinates[-5:], last_metrics.get('items', []))
|
@@ -134,8 +134,8 @@ def generate_pie_chart():
|
|
134 |
return pie_path
|
135 |
|
136 |
# Gradio UI
|
137 |
-
with gr.Blocks(theme=custom_theme, css=".status-text {font-size: 18px !important; color: black !important} .video-feed {border: 2px solid red !important} .metrics-box {border: 2px solid green !important} .logs-box {border: 2px solid orange !important} .control-btn {font-size: 16px !important} .slider {width: 300px !important}") as app:
|
138 |
-
gr.Markdown("# 🛣️ Drone Road Inspection Dashboard"
|
139 |
|
140 |
status_text = gr.Markdown("**Status:** 🟢 Running", elem_classes="status-text")
|
141 |
|
|
|
36 |
custom_theme = gr.themes.Soft(
|
37 |
primary_hue="red",
|
38 |
secondary_hue="green",
|
39 |
+
neutral_hue="gray",
|
40 |
text_size="lg",
|
41 |
radius_size="lg",
|
42 |
)
|
|
|
94 |
crack_severity_all.pop(0)
|
95 |
|
96 |
frame = cv2.resize(last_frame, (800, 600))
|
97 |
+
cv2.putText(frame, f"Frame: {frame_count}", (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 0), 2)
|
98 |
cv2.putText(frame, f"{last_timestamp}", (20, 80), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 0), 2)
|
99 |
|
100 |
map_path = generate_map(gps_coordinates[-5:], last_metrics.get('items', []))
|
|
|
134 |
return pie_path
|
135 |
|
136 |
# Gradio UI
|
137 |
+
with gr.Blocks(theme=custom_theme, css="body {background-color: #f0f0f0 !important} .status-text {font-size: 18px !important; color: black !important} .video-feed {border: 2px solid red !important} .metrics-box {border: 2px solid green !important} .logs-box {border: 2px solid orange !important} .control-btn {font-size: 16px !important} .slider {width: 300px !important}") as app:
|
138 |
+
gr.Markdown("# 🛣️ Drone Road Inspection Dashboard")
|
139 |
|
140 |
status_text = gr.Markdown("**Status:** 🟢 Running", elem_classes="status-text")
|
141 |
|