Spaces:
Sleeping
Sleeping
title: FF4ALL WILD DEMONSTRATOR | |
emoji: ๐๏ธ | |
colorFrom: purple | |
colorTo: red | |
sdk: gradio | |
sdk_version: 5.33.0 | |
app_file: attribution_demonstrator/main.py | |
pinned: false | |
# Demonstrator | |
## Run the demonstrator | |
Export the required environment variables: | |
```bash | |
export AZURE_CONNECTION_STRING="...." | |
export CONTAINER_NAME="..." | |
export DATABRICKS_CLIENT_ID="..." | |
export DATABRICKS_SECRET="..." | |
export MODELS="..." | |
``` | |
## Using pip | |
1. install the required packages: | |
```bash | |
pip install -r requirements.txt | |
``` | |
2. run the demonstrator with the command: | |
```bash | |
export PYTHONPATH=${PWD}/. | |
python -m attribution_demonstrator.main | |
``` | |
## Using uv | |
1. install uv, please refer to the [uv documentation](https://docs.astral.sh/uv/) | |
2. run the demonstrator with the command: | |
```bash | |
cd src | |
export PYTHONPATH=${PWD}/. | |
uv run -m attribution_demonstrator.main | |
``` | |
## Exporting uv env to a requirements.txt | |
```bash | |
uv export --no-emit-workspace --no-dev --no-annotate --no-header --no-hashes --output-file requirements.txt | |
``` | |
# Environment variables | |
## AZURE_CONNECTION_STRING | |
The connection string to the Azure Blob Storage account where the model files are stored. | |
## CONTAINER_NAME | |
The name of the Azure Blob Storage container used for temporary image storage. | |
## DATABRICKS_CLIENT_ID and DATABRICKS_SECRET | |
The client ID and secret for the Databricks workspace where the models are hosted. These are used to authenticate and access the models. | |
The token can be generate in the Databricks workspace under `Workspace settings > Identity and access > Service principals`. | |
## MODELS | |
A json string containing the model names and their corresponding urls. The format is: | |
```json | |
{"model_name_1": "url", "model_name_2": "url"} | |
``` | |