Spaces:
Runtime error
Runtime error
Commit ·
9aece52
1
Parent(s): ef86f0f
progress bar
Browse files
app.py
CHANGED
|
@@ -52,7 +52,11 @@ def sigmoid(x):
|
|
| 52 |
|
| 53 |
|
| 54 |
@spaces.GPU()
|
| 55 |
-
def inference(x, count_only_api, api_key,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
print(x)
|
| 57 |
# check if GPU is available
|
| 58 |
if torch.cuda.is_available():
|
|
@@ -269,20 +273,21 @@ def inference(x, count_only_api, api_key, img_size=224, seq_len=64, stride_lengt
|
|
| 269 |
template="plotly_dark")
|
| 270 |
|
| 271 |
fig.update_layout(legend=dict(
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
|
|
|
| 286 |
)
|
| 287 |
fig.update_layout(coloraxis_colorbar=dict(
|
| 288 |
tickvals=event_type_tick_vals,
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
@spaces.GPU()
|
| 55 |
+
def inference(x, count_only_api, api_key,
|
| 56 |
+
img_size=224, seq_len=64, stride_length=32, stride_pad=3, batch_size=4,
|
| 57 |
+
miss_threshold=0.8, marks_threshold=0.6, median_pred_filter=True, center_crop=True, both_feet=True,
|
| 58 |
+
api_call=False,
|
| 59 |
+
progress=gr.Progress(track_tqdm=True)):
|
| 60 |
print(x)
|
| 61 |
# check if GPU is available
|
| 62 |
if torch.cuda.is_available():
|
|
|
|
| 273 |
template="plotly_dark")
|
| 274 |
|
| 275 |
fig.update_layout(legend=dict(
|
| 276 |
+
orientation="h",
|
| 277 |
+
yanchor="bottom",
|
| 278 |
+
y=0.98,
|
| 279 |
+
xanchor="right",
|
| 280 |
+
x=1,
|
| 281 |
+
font=dict(
|
| 282 |
+
family="Courier",
|
| 283 |
+
size=12,
|
| 284 |
+
color="black"
|
| 285 |
+
),
|
| 286 |
+
bgcolor="AliceBlue",
|
| 287 |
+
),
|
| 288 |
+
paper_bgcolor='rgba(0,0,0,0)',
|
| 289 |
+
plot_bgcolor='rgba(0,0,0,0)',
|
| 290 |
+
marker_line_width=0
|
| 291 |
)
|
| 292 |
fig.update_layout(coloraxis_colorbar=dict(
|
| 293 |
tickvals=event_type_tick_vals,
|