25 строки
434 B
Python
25 строки
434 B
Python
__version__ = "1.0.0"
|
|
__author__ = "csasq"
|
|
__license__ = "CC BY-NC 4.0"
|
|
|
|
|
|
import logging
|
|
import shutil
|
|
|
|
import uvicorn
|
|
|
|
from api import app
|
|
import config
|
|
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
uvicorn.run(
|
|
app=app,
|
|
host=config.Main.host,
|
|
port=config.Main.port,
|
|
log_level=logging.WARNING,
|
|
)
|
|
except InterruptedError:
|
|
shutil.rmtree(config.Main.images_directory)
|