Commit 2c47cd80 authored by Matteo's avatar Matteo
Browse files

update server

parent 1e556caa
...@@ -10,4 +10,4 @@ RUN pip install --no-cache-dir -r requirements.txt ...@@ -10,4 +10,4 @@ RUN pip install --no-cache-dir -r requirements.txt
VOLUME [ "/data" ] VOLUME [ "/data" ]
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "80", "--log-config", "log_config.yaml"] CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "80", "--log-config", "config/logger.yaml"]
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,7 @@ from fastapi import FastAPI, Response, status ...@@ -4,9 +4,7 @@ from fastapi import FastAPI, Response, status
from packager import __author__, __version__, __license__, __email__, __maintainer__ from packager import __author__, __version__, __license__, __email__, __maintainer__
app = FastAPI( description ="""
title="Tape Audio Restoration",
description="""
[![MPAI CAE-ARP](https://img.shields.io/badge/MPAI%20CAE--ARP-gray?style=for-the-badge&logo=AppleMusic&logoColor=cyan&link=https://mpai.community/standards/mpai-cae/about-mpai-cae/)](https://mpai.community/standards/mpai-cae/about-mpai-cae/) [![MPAI CAE-ARP](https://img.shields.io/badge/MPAI%20CAE--ARP-gray?style=for-the-badge&logo=AppleMusic&logoColor=cyan&link=https://mpai.community/standards/mpai-cae/about-mpai-cae/)](https://mpai.community/standards/mpai-cae/about-mpai-cae/)
Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/standards/mpai-cae/about-mpai-cae/#Figure2) *Packager* AIM, providing: Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/standards/mpai-cae/about-mpai-cae/#Figure2) *Packager* AIM, providing:
...@@ -21,7 +19,11 @@ Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/ ...@@ -21,7 +19,11 @@ Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/
fully synchronised with the video; fully synchronised with the video;
3. Set of Irregularity Images in a .zip file; 3. Set of Irregularity Images in a .zip file;
4. Irregularity File. 4. Irregularity File.
""", """
app = FastAPI(
title="Tape Audio Restoration",
description=description,
version=__version__, version=__version__,
contact={ contact={
"name": __maintainer__, "name": __maintainer__,
...@@ -34,8 +36,21 @@ Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/ ...@@ -34,8 +36,21 @@ Implements the Technical Specification of [MPAI CAE-ARP](https://mpai.community/
@app.get("/") @app.get("/")
def index(): def index() -> list[str]:
return {"endpoints": ["restore", "docs"]} return ["restore", "description" "docs"]
@app.get("/description")
def get_server_info():
return {
"name": "Packager",
"version": __version__,
"author": __author__,
"email": __email__,
"license": __license__,
"maintainer": __maintainer__,
"description": description
}
@app.get("/package", status_code=200) @app.get("/package", status_code=200)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment