#!/bin/bash
~/vendor/sub-seg/.venv/bin/python3 ~/vendor/sub-seg/src/prediction.py "$1" /tmp/subseg-predict.txt
~/vendor/sub-seg/.venv/bin/python3 ~/vendor/sub-seg/src/postprocess_to_single_lines.py "$1" /tmp/subseg-predict.txt /tmp/subseg-cleaned.txt
grep -v -e "^$" /tmp/subseg-cleaned.txt > "${1%.*}--backstage--split.txt"
