A newer version of the Gradio SDK is available: 6.13.0
GitHub Copilot Instructions
Commit Message Guidelines
Conventional Commits
Use the Conventional Commits specification for all commit messages:
<type>(<scope>): <subject>
<body>
<footer>
Types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic changes)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system or dependencies changesci: CI/CD configuration changeschore: Other changes that don't modify src or test files
Best Practices
- Keep subject line short: Max 50 characters
- Use imperative mood: "add" not "added" or "adds"
- No period at the end: Subject line should not end with a period
- Capitalize first letter: Start subject with capital letter
- Separate subject from body: Leave a blank line between subject and body
- Wrap body at 72 characters: For better readability
- Use body to explain what and why: Not how (code explains how)
- Reference issues: Use footer to reference issues (e.g., "Closes #123")
Examples
Good:
feat(api): add hate speech detection endpoint
Implement new REST API endpoint that uses BERT model
to classify text for hate speech content.
Closes #42
fix(deps): update backports-strenum to 1.2.8
Fixes Python 3.11 compatibility issue in Hugging Face Space build.
docs: update README with deployment instructions
Bad:
Fixed a bug in the code that was causing problems.
WIP: changes to the model
Updated dependencies and fixed some issues with the gradio interface and also refactored the code
Code Quality Guidelines
- Follow PEP 8 for Python code
- Use type hints where applicable
- Write docstrings for functions and classes
- Keep functions small and focused (single responsibility)
- Use meaningful variable and function names
- Add comments for complex logic only
- Prefer composition over inheritance
- Write unit tests for new features