This course comes from the HuggingFace course: course
- In process
This project uses uv as the package manager for faster and more reliable dependency management, and includes a Makefile for streamlined development workflows.
- Python 3.12 or higher
- Git
- uv package manager (will be installed automatically via Makefile)
make install_uvmake venvWindows:
.\activate.ps1Linux/MacOS:
source .venv/bin/activatemake installThis will install all required packages using uv for faster dependency resolution and installation.
The project includes a comprehensive Makefile with the following commands:
| Command | Description |
|---|---|
make install_uv |
Install uv package manager |
make venv |
Create virtual environment |
make install |
Install dependencies using uv |
make test |
Run tests with pytest |
make format |
Format code with black and isort |
make lint |
Run linting tools (format, flake8, pyupgrade) |
make check-all |
Run all checks and tests |
make clean |
Clean up environment |
make build |
Build Docker image |
make run |
Run Docker container |
make help |
Display all available commands |
To run the Streamlit application, simply execute the provided PowerShell script from the root directory:
.\run_st_fapp.ps1This will start the Streamlit app located at src/first_agent/st_app.py.
The Gradio app in src/first_agent/ should be run in a Docker container due to security issues with current library versions that are mitigated in a containerized environment.
To dockerize and run the Gradio app: see README.md in src/first_agent/.
- Create a
.envfile in the root directory:
touch .env # For Linux/MacOS
# or manually create .env file in Windows- Add the following environment variables to your
.envfile:
# Required Settings
DEEPSEEK_API_KEY="your-deepseek-api-key"
# Optional Settings (with defaults)
MYAPP_DEBUG=false
MYAPP_ENVIRONMENT=dev # Options: dev, prod, staging
MYAPP_APP_NAME="MyApp"| Variable | Required | Default | Description |
|---|---|---|---|
| DEEPSEEK_API_KEY | Yes | - | API key for DEEPSEEK platform |
| MYAPP_DEBUG | No | false | Enable/disable debug mode |
| MYAPP_ENVIRONMENT | No | dev | Application environment (dev/prod/staging) |
| MYAPP_APP_NAME | No | MyApp | Name of the application |
The application uses Pydantic settings for configuration management. You can import and use the settings in your code like this:
from config.settings import settings
# Access configuration values
api_key = settings.deepseek_api_key
debug_mode = settings.debug
current_env = settings.environment├── config/
│ └── settings.py # Configuration management
├── src/
│ └── first_agent/ # Main agent application
│ ├── app.py # Main application
│ ├── st_app.py # Streamlit app
│ ├── Gradio_UI.py # Gradio interface
│ ├── Streamlit_UI.py # Streamlit interface
│ └── Dockerfile # Docker configuration for Gradio app
├── Makefile # Development commands
├── run_st_fapp.ps1 # Script to run Streamlit app
├── activate.ps1 # Windows activation script
├── .venv/ # Virtual environment (not in repo)
├── .env # Environment variables (not in repo)
├── .gitignore # Git ignore file
└── README.md # This file
- Setup: Use
make venvandmake installfor initial setup - Code Quality: Use
make formatandmake lintbefore committing - Testing: Run
make testto ensure all tests pass - All Checks: Use
make check-allfor comprehensive validation
To add new configuration settings:
- Add the environment variable to your
.envfile - Add the corresponding field in
config/settings.py - Update this README with the new variable details
- Create a new branch for your feature
- Make your changes
- Run
make check-allto ensure code quality - Submit a pull request
- Never commit the
.envfile to version control - Keep your API keys and secrets secure
- Use environment variables for sensitive information
- Important: Use the dockerized Gradio app to avoid security vulnerabilities in current library versions
[Your License Here]
The dashboard uses synthetic data generated with the following structure:
- product_id: Unique identifier for each product
- product_type: Category (MEUBLE or DECO)
- product_name: Name of the product
- transaction_id: Unique identifier for each transaction
- date: Transaction date
- order_id: Order identifier
- client_id: Customer identifier
- prod_id: Product identifier
- prod_price: Product price
- prod_qty: Quantity sold
- The main chart shows product sales distribution
- Use the animation controls to switch between different views
- View summary statistics in the metrics section
- Toggle the "Show Raw Data" checkbox to see the complete dataset
Dependencies are managed using uv for faster installation and resolution. Main dependencies include:
- streamlit
- ipyvizzu
- pandas
- loguru
To see the complete list of dependencies, check the requirements.txt file.