from typing import Union from fastapi import FastAPI from src.utils_youtube import get_youtube_transcript ## create a new FASTAPI app instance app=FastAPI() @app.get("/") def home(): return {"message":"Hello World"} # Define a function to handle the GET request at `/generate` @app.get("/generate/") def generate(youtubeurl,src_lang,target_lang): transript=get_youtube_transcript(youtubeurl,src_lang,target_lang) return {"output":f"{transript}"}