vid_verse / app /main.py
badalsahani's picture
Update app/main.py
15fd379
raw
history blame contribute delete
572 Bytes
from fastapi import FastAPI, UploadFile
from pydantic import BaseModel
from .functions import handle_url, get_health, test_response
class VideoURL(BaseModel):
url: str
from_lang: str = "en"
to_lang: str = "hi"
gender: str = "MALE"
app = FastAPI()
@app.get("/")
async def main():
return get_health()
@app.post("/synthesize_video_url")
async def synthesize_video_url(video: VideoURL):
return handle_url(video.url, video.from_lang, video.to_lang, video.gender)
@app.post("/test")
async def test(video: VideoURL):
return test_response()