Downloads · 30 days
0
virajm/omnishotcut-endpoint
omnishotcut-endpoint is a machine learning model from virajm. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A thin custom Inference Endpoint wrapper around OmniShotCut. Returns shot ranges plus typed transition labels for a video.
Downloads · 30 days
0
Access
Public
Updated Jul 7, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py3.3 KB · 43%
From the Hugging Face model README
A thin custom Inference Endpoint wrapper around OmniShotCut. Returns shot ranges plus typed transition labels for a video.
The model weights are pulled from uva-cv-lab/OmniShotCut at cold start, so this
repo hosts only handler.py + requirements.txt.
# 1. create an empty MODEL repo on your account (not a Space)
huggingface-cli login # your token; keep it out of any file
huggingface-cli repo create omnishotcut-endpoint --type model
# 2. push these two files
git clone https://huggingface.co/<you>/omnishotcut-endpoint && cd omnishotcut-endpoint
cp /path/to/handler.py /path/to/requirements.txt .
git add handler.py requirements.txt && git commit -m "OmniShotCut endpoint handler" && git push
Then on the repo page: Deploy ▸ Inference Endpoints ▸ pick a GPU instance (a small T4/L4 is plenty), leave the container as Default, and Create Endpoint. Set Automatic scale-to-zero so it stops billing when idle.
import requests
API = "https://<your-endpoint>.endpoints.huggingface.cloud"
HDR = {"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"}
# video by URL (endpoint fetches it) — or send a base64 mp4 in "inputs"
body = {"inputs": "https://example.com/clip.mp4", "parameters": {"mode": "default"}}
print(requests.post(API, headers=HDR, json=body, timeout=300).json())
# -> {"shots": [[0,124],[125,300],...],
# "intra_labels": ["General","Dissolve","Wipe",...],
# "inter_labels": ["New-Start","Hard Cut","Transition",...]}
mode="clean_shot" returns just {"shots": [...]}.