Spaces:
Sleeping
Sleeping
| set -euo pipefail | |
| export http_proxy="http://127.0.0.1:7890" | |
| export https_proxy="http://127.0.0.1:7890" | |
| if [[ -z "${GEMINI_API_KEY:-}" ]]; then | |
| echo "Error: GEMINI_API_KEY is not set." | |
| echo 'Run: export GEMINI_API_KEY="your_api_key"' | |
| exit 1 | |
| fi | |
| # if ! python3 -c "from google import genai" >/dev/null 2>&1; then | |
| # echo "Installing dependency: google-genai" | |
| # python3 -m pip install --upgrade google-genai | |
| # fi | |
| datetime=$(date +%m%d%H%M%S) | |
| name=leaves_video | |
| output_dir="output_video/${name}_${datetime}" | |
| prompt=" | |
| Autumn leaves drifting slowly on the black background. | |
| The leaves are of different shapes, colors ranging from red to gold, and distances to camera are diverse. | |
| Overall the leaves should be sparse and extremely small, because this serves as background of some video. | |
| " | |
| python gen_video_prompt_only.py \ | |
| --prompt "$prompt" \ | |
| --resolution 720p \ | |
| --duration 8 \ | |
| --aspect-ratio 16:9 \ | |
| --name $name \ | |
| --output_dir $output_dir | |