Commit
·
d8e1d9c
1
Parent(s):
c564fad
quick dockerignore and dependency cleaning.
Browse files- .dockerignore +0 -2
- main.py +0 -3
- utils/transcriber.py +0 -1
.dockerignore
CHANGED
|
@@ -2,8 +2,6 @@
|
|
| 2 |
.devcontainer
|
| 3 |
__pycache__/
|
| 4 |
*.git
|
| 5 |
-
temp/
|
| 6 |
-
archive/
|
| 7 |
Pipfile
|
| 8 |
Pipfile.lock
|
| 9 |
api_config.yml
|
|
|
|
| 2 |
.devcontainer
|
| 3 |
__pycache__/
|
| 4 |
*.git
|
|
|
|
|
|
|
| 5 |
Pipfile
|
| 6 |
Pipfile.lock
|
| 7 |
api_config.yml
|
main.py
CHANGED
|
@@ -3,9 +3,7 @@ from typing import Optional
|
|
| 3 |
|
| 4 |
from utils.process_video import process_video
|
| 5 |
from utils.zip_response import zip_response
|
| 6 |
-
from utils.api_configs import api_configs
|
| 7 |
from utils.read_html import read_html
|
| 8 |
-
from utils.logger import setup_logger
|
| 9 |
|
| 10 |
from fastapi import FastAPI, UploadFile, HTTPException, Form, Depends
|
| 11 |
from fastapi.responses import HTMLResponse, Response
|
|
@@ -117,5 +115,4 @@ async def process_video_api(video_file: MP4Video = Depends(),
|
|
| 117 |
raise HTTPException(status_code=500, detail=str(e))
|
| 118 |
|
| 119 |
if __name__ == "__main__":
|
| 120 |
-
app_logger = setup_logger('appLogger', 'main.log', level=logging.DEBUG)
|
| 121 |
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
|
|
| 3 |
|
| 4 |
from utils.process_video import process_video
|
| 5 |
from utils.zip_response import zip_response
|
|
|
|
| 6 |
from utils.read_html import read_html
|
|
|
|
| 7 |
|
| 8 |
from fastapi import FastAPI, UploadFile, HTTPException, Form, Depends
|
| 9 |
from fastapi.responses import HTMLResponse, Response
|
|
|
|
| 115 |
raise HTTPException(status_code=500, detail=str(e))
|
| 116 |
|
| 117 |
if __name__ == "__main__":
|
|
|
|
| 118 |
uvicorn.run(app, host="0.0.0.0", port=8000)
|
utils/transcriber.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
from gradio_client import Client, handle_file
|
| 2 |
from utils.api_configs import api_configs
|
| 3 |
-
import tempfile
|
| 4 |
|
| 5 |
def transcriber(invideo_file:str, srt_file:str,
|
| 6 |
max_words_per_line:int, task:str,
|
|
|
|
| 1 |
from gradio_client import Client, handle_file
|
| 2 |
from utils.api_configs import api_configs
|
|
|
|
| 3 |
|
| 4 |
def transcriber(invideo_file:str, srt_file:str,
|
| 5 |
max_words_per_line:int, task:str,
|