kevin-e-work/dental-insurance
0
Configuration
The app loads coverage data from remote URLs. The coverage files (CoverageResults.json and CoverageResultsLegacy.json) are not stored in this repository - they are loaded from the configured URLs.
Configuration Variables
The following variables can be configured:
coverage_file_url- URL for the main coverage results file (CoverageResults.json)coverage_legacy_file_url- URL for the legacy format coverage results file (CoverageResultsLegacy.json) (optional)bearer_token- Bearer token for API authentication (required for Jobs screen)api_base_url- Base URL for the API endpoint (defaults tohttp://localhost:3000/v1.1for dev)
For Local Development
- Copy the example config file:
cp config.json.example config.json- Edit
config.jsonand add your configuration:
{
"coverage_file_url": "https://your-coverage-file-url-here.json",
"coverage_legacy_file_url": "https://your-legacy-coverage-file-url-here.json",
"bearer_token": "your-bearer-token-here",
"api_base_url": "http://localhost:3000/v1.1"
} Note: For local development, api_base_url defaults to http://localhost:3000/v1.1 if not specified.
For Production Deployment
- Go to your deployment platform settings (e.g., Hugging Face Spaces)
- Navigate to "Variables and secrets"
- Add the following environment variables:
COVERAGE_FILE_URL- URL for the main coverage results fileCOVERAGE_LEGACY_FILE_URL- URL for the legacy format coverage results file (optional)BEARER_TOKEN- Bearer token for API authenticationAPI_BASE_URL- Base URL for the API (e.g.,https://api.emmarobot.io/v1.1for production)
Note:
- Environment variables take precedence over
config.jsonif both are set - The legacy file URL is optional - the app will work with just the main coverage file URL
- For production, set
API_BASE_URLtohttps://api.emmarobot.io/v1.1 - For development,
API_BASE_URLdefaults tohttp://localhost:3000/v1.1if not set
Running Locally
Install dependencies:
pip install -r requirements.txtSet up your configuration (see above), then run the app:
streamlit run app.pyThe app will open in your browser at http://localhost:8501.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
