Spaces:
Sleeping
Sleeping
File size: 599 Bytes
bd65e34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from pathlib import Path
import solara
import polars as pl
from inference import run_inference
from utils.movie_clips import build_video
@solara.memoize
def solara_run_inference(
model_path: Path,
image_folder: Path,
aggregate_duration: int = 30,
fps: int = 3,
) -> pl.DataFrame:
return run_inference(model_path, image_folder, aggregate_duration, fps)
@solara.memoize(key=lambda _, _2, higlight_vid: higlight_vid)
def convert_vid(
file_name: str | Path, time_dict: list[dict[str, str]], highlight_vid: Path
):
return build_video(file_name, time_dict, highlight_vid)
|