o
    !\i                     @   s  d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ ddlZddlmZ dd	lmZ dd
lmZmZmZmZmZ ddlmZ ejeeejdd eddddZ e j!de
dddd eddZ"e j#ej$ddgd e j#ej$ddgd e j#ej$ddgd e j#ej$ddgd e j#ej$ddgd e j#ej$d gd! e %d"d#d$ Z&e %d%d&d' Z'e(d(krddl)Z)e)j*e ej+ej,d) dS dS )*zMain FastAPI application    )FastAPIDependsHTTPExceptionHeaderRequest)HTMLResponse)StaticFiles)Jinja2Templates)SessionN)settings)get_db)matchespredictionsmodelsrunsadmin)routesz4%(asctime)s - %(name)s - %(levelname)s - %(message)s)levelformatzSports Predictorz'ML-based sports match prediction systemz0.1.0)titledescriptionversionz/staticzapp/web/static)	directorystatic)namezapp/web/templatesz/apir   )prefixtagsr   r   r   z
/api/adminr   web)r   z/healthc                      s
   ddiS )zHealth check endpointstatusok r    r    r    G/var/www/www-root/data/www/176.119.141.140/sports-predictor/app/main.pyhealth+   s   r"   /c                     s   ddl m}  | ddS )z(Root endpoint redirects to web interfacer   RedirectResponsez/web/)url)fastapi.responsesr%   r$   r    r    r!   root1   s   
r(   __main__)hostport)-__doc__fastapir   r   r   r   r   r'   r   fastapi.staticfilesr   fastapi.templatingr	   sqlalchemy.ormr
   loggingapp.core.configr   app.core.db.databaser   app.apir   r   r   r   r   app.webr   
web_routesbasicConfiggetattr	log_levelappmount	templatesinclude_routerroutergetr"   r(   __name__uvicornrunapi_hostapi_portr    r    r    r!   <module>   sH    



