Spaces:
Runtime error
Runtime error
whisper.api
This is a production level project structure for a Python FastAPI project.
Project Structure
whisper.api
βββ app
β βββ __init__.py
β βββ api
β β βββ __init__.py
β β βββ endpoints
β β β βββ __init__.py
β β β βββ items.py
β β β βββ users.py
β β βββ models
β β βββ __init__.py
β β βββ item.py
β β βββ user.py
β βββ core
β β βββ __init__.py
β β βββ config.py
β β βββ security.py
β β βββ database.py
β βββ tests
β β βββ __init__.py
β β βββ conftest.py
β β βββ test_api
β β β βββ __init__.py
β β β βββ test_items.py
β β β βββ test_users.py
β β βββ test_core
β β βββ __init__.py
β β βββ test_config.py
β β βββ test_security.py
β β βββ test_database.py
β βββ main.py
βββ .env
βββ .gitignore
βββ Dockerfile
βββ requirements.txt
βββ README.md
βββ .vscode
βββ settings.json
βββ launch.json
Description
The project structure is organized as follows:
app
: contains the main application code.app/api
: contains the API endpoints.app/api/endpoints
: contains the endpoint functions.app/api/models
: contains the data models.app/core
: contains the core application code.app/core/config.py
: contains the application configuration.app/core/security.py
: contains the security functions.app/core/database.py
: contains the database connection code.app/tests
: contains the test code.app/tests/test_api
: contains the API endpoint tests.app/tests/test_core
: contains the core application tests.app/main.py
: contains the main application entry point..env
: contains environment variables..gitignore
: specifies files and directories to ignore in Git.Dockerfile
: specifies the Docker image configuration.requirements.txt
: specifies the Python dependencies.README.md
: this file..vscode
: contains Visual Studio Code configuration files.
Run this Project
uvicorn app.main:app --reload
Run Test
python -m unittest
Upload File
curl -X 'POST' \
'http://localhost:8000/api/v1/transcribe/' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'audio_file=@ElevenLabs_2023-08-10T13 53 05.000Z_VedVoice_bFrkzQsyKvReo52Q6712.mp3;type=audio/mpeg'