Tiktok-Talent-Info/main.py

18 lines
448 B
Python
Raw Normal View History

2025-01-23 21:50:55 +08:00
from fastapi import FastAPI
from endpoints.text import text_query
from endpoints.image import image_query
from endpoints.video import video_query
app = FastAPI()
# Register routes
app.post("/api/text")(text_query)
app.post("/api/image")(image_query)
app.post("/api/video")(video_query)
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8080, reload=True)
# python main.py
# uvicorn main:app --reload