Spaces:
Runtime error
Runtime error
File size: 1,175 Bytes
eee346e 3ec4ff0 0f53e1d 3ec4ff0 c3aa969 0f53e1d c3aa969 0f53e1d c3aa969 eee346e 0f53e1d c3aa969 0f53e1d 3ec4ff0 c3aa969 0f53e1d c3aa969 0f53e1d eee346e 98fb351 eee346e 0f53e1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
#!/usr/bin/env python3
import logging
import os
from pathlib import Path
from typing import Dict
import asyncio
import src.common.config as config
async def setup_webserver() -> None:
"""Setup web server configuration."""
from src.modules.api import server
# import src.modules.yolo_train
await server()
pass
async def setup_transporter() -> None:
"""Setup transporter configuration."""
import src.modules.transporter
pass
async def setup_gradio() -> None:
"""Setup transporter configuration."""
# import src.modules.gradio_app
pass
async def main() -> None:
"""Main application entry point."""
try:
print("Start app...")
# import src.modules.transporter
task1 = asyncio.create_task(setup_webserver())
task2 = asyncio.create_task(setup_transporter())
task3 = asyncio.create_task(setup_gradio())
await asyncio.gather(task1, task2, task3)
print("App started successfully.")
except Exception as e:
logging.error(f"Application failed to start: {e}", exc_info=True)
raise
if __name__ == "__main__":
asyncio.run(main())
|