|
## Agent Guidelines for HybridTransformer-MFIF |
|
|
|
### Build & Test Commands |
|
- **Setup**: `uv sync` or `pip install -r requirements.txt` |
|
- **Run**: `gradio app.py` or `python app.py` |
|
|
|
### Code Style |
|
- **Language**: Python 3.12+ |
|
- **Formatting**: PEP 8 compliant. |
|
- **Imports**: Standard library first, then third-party, then local. |
|
- **Naming**: `snake_case` for functions/variables, `PascalCase` for classes. |
|
- **Types**: Use type hints (`torch.Tensor`, `Tuple`, `Optional`). |
|
- **Docstrings**: Use for public functions. |
|
- **Error Handling**: Use `try/except` for file I/O and model operations. |
|
|
|
### Project Structure |
|
- `app.py`: Main Gradio application. |
|
- `hf/`: Core implementation (e.g., `model.py`, `utils.py`). |
|
- `scripts/`: Training and inference scripts. |
|
- `notebooks/`: Jupyter notebooks for experimentation. |
|
- `checkpoints/`: Model checkpoints. |
|
- `results/`: Inference outputs. |
|
- `datasets/`: Datasets. |
|
|