18 lines
448 B
Python
18 lines
448 B
Python
|
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
|