Add subtitle in video #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Add subtitle in video | |
on: | |
workflow_dispatch: | |
inputs: | |
url: | |
description: The URL to process | |
required: true | |
model: | |
description: The model name to use (optional) | |
required: false | |
jobs: | |
run-with-url: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Install pipenv and ffmpeg | |
run: | | |
sudo apt-get update && sudo apt-get install -y ffmpeg | |
pip install pipenv | |
- name: Setup and run the script | |
run: | | |
pipenv install | |
if [[ -n ${{ github.event.inputs.model }} ]]; then | |
pipenv run python main.py ${{ github.event.inputs.url }} --model ${{ github.event.inputs.model }} | |
else | |
pipenv run python main.py ${{ github.event.inputs.url }} | |
fi |