File size: 944 Bytes
32a0eda |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import uvicorn
from fastapi import FastAPI
from src.apis.language_translation_api import language_translation_router
from src.apis.img_processing_api import image_processing_router
from src.apis.speech_processing_api import speech_transcription_router
import argparse
learnable_ai = FastAPI()
learnable_ai.include_router(language_translation_router, prefix='/translator', tags=["Language Translation"])
learnable_ai.include_router(image_processing_router, prefix='/image', tags=["Image Processing"])
learnable_ai.include_router(speech_transcription_router, prefix='/speech', tags=["Speech Processing"])
parser = argparse.ArgumentParser(description='LearnableAI API')
parser.add_argument('--host', type=str, default='0.0.0.0', help='Host IP address')
parser.add_argument('--port', type=int, default=7860, help='Port number')
args = parser.parse_args()
if __name__ == "__main__":
uvicorn.run(learnable_ai, host=args.host, port=args.port)
|