Spaces:
Sleeping
Sleeping
Download app.py from Trkaga/InVideo.clone.SaaS: direct link, hf CLI and curl.
- Browser
- Download file 492 Bytes
-
https://huggingface.co/spaces/Trkaga/InVideo.clone.SaaS/resolve/main/app.py
- Command line
-
hf download hf://spaces/Trkaga/InVideo.clone.SaaS/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Trkaga/InVideo.clone.SaaS/resolve/main/app.py
492 Bytes
| from flask import Flask, render_template, request, jsonify | |
| from api.generate_video import create_video | |
| app = Flask(__name__) | |
| def home(): | |
| return render_template("index.html") | |
| def video(): | |
| data = request.json | |
| prompt = data["prompt"] | |
| job_id = create_video(prompt) | |
| return jsonify({ | |
| "status": "processing", | |
| "job_id": job_id | |
| }) | |
| if __name__ == "__main__": | |
| app.run(host="0.0.0.0", port=7860) |