INNER CODE UNIT · Python

index

rohitg00/awesome-ai-apps · multimodal-apps/gemini-veo-sketch2video/app.py:73

def index():
    """Renders the main HTML page."""
    return render_template('index.html')

@app.route('/generate', methods=['POST'])
def generate_video_from_sketch():
    """Full pipeline: sketch -> image -> video."""
    if not all([gemini_image_client, veo_video_client, gcs_client]):
        return jsonify({"error": "A server-side client is not initialized. Check server logs."}), 500

    if not request.json or 'image_data' not in request.json:
        return jsonify({"error": "Missing image_data in request"}), 400

    base64_image_data = request.json['image_data']
    user_prompt = request.json.get('prompt', '').strip()

    # --- Step 1: Generate Image with Gemini ---
    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…