Spaces:
Runtime error
Runtime error
Commit ·
c843211
1
Parent(s): 547e0cb
upgrade
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🦘
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.13.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
app.py
CHANGED
|
@@ -243,7 +243,8 @@ def inference(x, count_only_api, api_key, img_size=192, seq_len=64, stride_lengt
|
|
| 243 |
'jumps_size': (full_marks + 0.05) * 10,
|
| 244 |
'miss_size': np.clip((1 - periodicity) * 0.9 + 0.1, 1, 10),
|
| 245 |
'seconds': np.linspace(0, seconds, num=len(periodLength))})
|
| 246 |
-
|
|
|
|
| 247 |
fig = px.scatter(data_frame=df,
|
| 248 |
x='seconds',
|
| 249 |
y='jumps per second',
|
|
@@ -252,7 +253,7 @@ def inference(x, count_only_api, api_key, img_size=192, seq_len=64, stride_lengt
|
|
| 252 |
color='event_type',
|
| 253 |
size='jumps_size',
|
| 254 |
size_max=10,
|
| 255 |
-
color_continuous_scale=
|
| 256 |
range_color=(0,1),
|
| 257 |
title="Jumping speed (jumps-per-second)",
|
| 258 |
trendline='rolling',
|
|
@@ -278,7 +279,7 @@ def inference(x, count_only_api, api_key, img_size=192, seq_len=64, stride_lengt
|
|
| 278 |
plot_bgcolor='rgba(0,0,0,0)'
|
| 279 |
)
|
| 280 |
fig.update_layout(coloraxis_colorbar=dict(
|
| 281 |
-
tickvals=
|
| 282 |
ticktext=['single rope speed', 'double dutch', 'double unders', 'single bounces', 'double bounces', 'triple unders', 'other'],
|
| 283 |
title='event type'
|
| 284 |
))
|
|
|
|
| 243 |
'jumps_size': (full_marks + 0.05) * 10,
|
| 244 |
'miss_size': np.clip((1 - periodicity) * 0.9 + 0.1, 1, 10),
|
| 245 |
'seconds': np.linspace(0, seconds, num=len(periodLength))})
|
| 246 |
+
event_type_tick_vals = np.linspace(0, 1, num=7)
|
| 247 |
+
event_type_colors = ['red', 'orange', 'green', 'blue', 'purple', 'pink', 'black']
|
| 248 |
fig = px.scatter(data_frame=df,
|
| 249 |
x='seconds',
|
| 250 |
y='jumps per second',
|
|
|
|
| 253 |
color='event_type',
|
| 254 |
size='jumps_size',
|
| 255 |
size_max=10,
|
| 256 |
+
color_continuous_scale=[(t, c) for t, c in zip(event_type_tick_vals, event_type_colors)],
|
| 257 |
range_color=(0,1),
|
| 258 |
title="Jumping speed (jumps-per-second)",
|
| 259 |
trendline='rolling',
|
|
|
|
| 279 |
plot_bgcolor='rgba(0,0,0,0)'
|
| 280 |
)
|
| 281 |
fig.update_layout(coloraxis_colorbar=dict(
|
| 282 |
+
tickvals=event_type_tick_vals,
|
| 283 |
ticktext=['single rope speed', 'double dutch', 'double unders', 'single bounces', 'double bounces', 'triple unders', 'other'],
|
| 284 |
title='event type'
|
| 285 |
))
|