mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-11 21:18:36 +03:00
docs: add readme
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
DATABASE_URI="sqlite:///memory"
|
||||
ENVIRONMENT="test"
|
||||
API_SECRET="test_secret"
|
||||
BROKER_URL="memory://"
|
||||
DATABASE_URI="sqlite:///memory"
|
||||
ENVIRONMENT="test"
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -161,5 +161,6 @@ cython_debug/
|
||||
|
||||
# VS Code
|
||||
.vscode
|
||||
|
||||
.DS_Store
|
||||
|
||||
whisperbox.sqlite
|
||||
|
||||
58
README.md
58
README.md
@@ -1,3 +1,59 @@
|
||||
# whisper-api
|
||||
|
||||
> Tiny HTTP wrapper around [openai/whisper](https://github.com/openai/whisper).
|
||||
> HTTP wrapper around [openai/whisper](https://github.com/openai/whisper).
|
||||
|
||||
## API documentation
|
||||
|
||||
OpenAPI documentation can be accessed via `<service_url>/docs`.
|
||||
|
||||
## Deploy
|
||||
|
||||
// TODO
|
||||
|
||||
## Develop
|
||||
|
||||
It is recommended to setup a virtual environment for python tooling. To install dependencies dependencies in your virtual env, run `pip install -e .[tooling,web,worker]`
|
||||
|
||||
[docker-compose](https://docs.docker.com/get-started/08_using_compose/) is required for local development. Configuration such as `API_SECRET` can be adjusted in `./docker/dev/docker-compose.yml`.
|
||||
|
||||
### Start
|
||||
|
||||
```
|
||||
make dev
|
||||
```
|
||||
|
||||
Builds and starts the docker containers.
|
||||
|
||||
```
|
||||
# Bindings
|
||||
http://localhost:8000 => API
|
||||
http://localhost:8000/docs => API docs
|
||||
http://localhost:5555 => Celery dashboard
|
||||
./whisperbox.sqlite => Database
|
||||
```
|
||||
|
||||
## Destroy
|
||||
|
||||
This removes all containers and attached volumes.
|
||||
|
||||
```
|
||||
make clean
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
### Lint
|
||||
|
||||
```
|
||||
make lint
|
||||
```
|
||||
|
||||
### Format
|
||||
|
||||
```
|
||||
make fmt
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from asyncio.log import logger
|
||||
from typing import Dict, List, Optional
|
||||
from typing import List, Optional
|
||||
from uuid import UUID
|
||||
|
||||
from fastapi import APIRouter, Depends, FastAPI, HTTPException, Path
|
||||
@@ -29,8 +29,8 @@ def queue_task(job: models.Job) -> None:
|
||||
|
||||
|
||||
@api_router.get("/")
|
||||
def api_root() -> Dict:
|
||||
return {}
|
||||
def api_root() -> None:
|
||||
return None
|
||||
|
||||
|
||||
class PostJobPayload(BaseModel):
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3.8"
|
||||
|
||||
x-app-variables: &app-variables
|
||||
API_SECRET: a_very_secret_token
|
||||
DATABASE_URI: sqlite:////whisperbox.sqlite
|
||||
DATABASE_URI: sqlite:///./whisperbox.sqlite
|
||||
ENVIRONMENT: development
|
||||
BROKER_URL: redis://redis:6379/0
|
||||
WHISPER_MODEL: small
|
||||
@@ -15,9 +15,10 @@ services:
|
||||
- 6379:6379
|
||||
networks:
|
||||
- app
|
||||
resources:
|
||||
limits:
|
||||
memory: 128M
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 128M
|
||||
|
||||
web:
|
||||
container_name: whisperbox_web_dev
|
||||
|
||||
Reference in New Issue
Block a user