Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,10 +89,9 @@ def unified_prediction_function(frame):
|
|
| 89 |
if frame is None:
|
| 90 |
return None, create_prediction_html({})
|
| 91 |
|
| 92 |
-
# The predictor class handles all the complex ML logic
|
| 93 |
-
annotated_frame, probabilities = predictor.process_frame(frame)
|
| 94 |
-
|
| 95 |
annotated_frame, probabilities = predictor.process_frame_for_upload(frame)
|
|
|
|
|
|
|
| 96 |
|
| 97 |
def process_video(video_path, progress=gr.Progress(track_tqdm=True)):
|
| 98 |
"""Processes an uploaded video file frame-by-frame."""
|
|
|
|
| 89 |
if frame is None:
|
| 90 |
return None, create_prediction_html({})
|
| 91 |
|
|
|
|
|
|
|
|
|
|
| 92 |
annotated_frame, probabilities = predictor.process_frame_for_upload(frame)
|
| 93 |
+
|
| 94 |
+
return annotated_frame, create_prediction_html(probabilities)
|
| 95 |
|
| 96 |
def process_video(video_path, progress=gr.Progress(track_tqdm=True)):
|
| 97 |
"""Processes an uploaded video file frame-by-frame."""
|