-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add comprehensive demo website with DeBERTa v3 Large integration #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
d-ulker
wants to merge
86
commits into
main
Choose a base branch
from
feat/clean-demo-website
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
3a6d321
fix(security): prevent information exposure through exception
d-ulker f22683d
feat: Add comprehensive demo website with DeBERTa v3 Large integration
d-ulker 6e049c4
feat: Add local development server for demo testing
d-ulker d2ea54d
fix: add favicon and Chrome DevTools config to eliminate 404s
d-ulker 353a311
fix: resolve security vulnerabilities
d-ulker 88a7942
feat: comprehensive security and functionality improvements
d-ulker 30425d7
chore: add .gitleaksignore to suppress ML tokenizer false positives
d-ulker a175e7e
fix: address code review feedback and improve code quality
d-ulker ea2b982
security: address BAN-B104 binding to all interfaces audit
d-ulker 4d85a3c
fix: comprehensive security and performance improvements
d-ulker 1539173
ui: enhance demo interface with tooltips and improvements
d-ulker fd9b8a4
refactor: address code review feedback for maintainability
d-ulker a3b17c0
security: fix gitleaks configuration for ML tokenizer false positives
d-ulker ed536f2
chore: clean up remaining changes
d-ulker 73128a8
security: implement secure host binding to address BAN-B104 audit
d-ulker 2c5761b
fix: resolve unused variable warnings PYL-W0612
d-ulker 7b172f4
fix: resolve demo website API format and Chart.js import errors
d-ulker 6306a04
fix: improve ENDPOINTS fallback and timeout handling in comprehensive…
d-ulker 7addc7f
improve: add better user feedback for OpenAI proxy fallback
d-ulker 0c2592f
fix: update demo to work with deployed API format
d-ulker 1756c19
fix: correct API call format and improve error handling
d-ulker 117816e
security: fix information exposure through exceptions in api_server.py
d-ulker d17f0db
security: fix information exposure through exceptions across all depl…
d-ulker f2058aa
fix: address major linting issues and security warnings
d-ulker df83ee8
security: implement centralized host binding security module
d-ulker bcf0009
fix: clean up all trailing whitespace and blank line formatting issues
d-ulker d995b3c
fix: address code review comments and improve security
d-ulker f785691
fix: improve memory logging robustness in startup_api.py
d-ulker 056e950
fix: address major linting issues and improve code quality
d-ulker 100a9f4
fix: resolve LayoutManager processing state stuck issue
d-ulker f1267bf
fix: resolve duplicate showProcessingState() call issue
d-ulker 1fb36e9
fix: resolve duplicate state check in processText function
d-ulker fa6889a
fix: optimize API timeout handling and processing state management
d-ulker 390c22e
fix: resolve input layout not showing after 'New Analysis' button click
d-ulker bc9c2a6
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] aadef29
refactor: clean up index.html and consolidate demo files
d-ulker 07a2485
fix: resolve FLK-E501 line length violations (31 occurrences)
d-ulker 331a836
Merge branch 'feat/clean-demo-website' of github.com:uelkerd/SAMO--DL…
d-ulker 8bd3714
feat: significantly improve demo website test coverage (74% → 80%+)
d-ulker fd2cf67
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] b19d4d5
fix: improve URLSearchParams mock and query string encoding
d-ulker 7b9615d
feat: achieve 88.5% test coverage - exceeding 85% target! 🎉
d-ulker 7e7670a
Fix linting issues and code quality improvements: remove duplicate im…
d-ulker 81acc76
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] ea169e1
Fix DeBERTa model URL and optimize cache-first loading
d-ulker 7bc4e1e
Fix critical security and functionality issues in local API servers
d-ulker 49f8ccc
Resolve merge conflicts in local API servers
d-ulker fbcd722
Fix remaining PII logging issues across codebase
d-ulker 15cee74
Fix hardcoded emotions in GCP predict.py
d-ulker 27f9060
Fix tokenizer/model mismatch and host binding in robust_predict.py
d-ulker c533813
Fix f-string syntax error in mega_comprehensive_model_test.py
d-ulker ba2b370
Fix label mismatch in debug_label_mismatch.py
d-ulker 79bdf96
Fix multiple deployment and API issues
d-ulker 0b36cfd
Fix multiple API and deployment issues
d-ulker 69a52ce
Fix Cloud Build CPU boost flags
d-ulker d132040
Improve label normalization in quick_label_fix.py
d-ulker 9ddeaf5
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] bd62766
fix: handle both API response shapes in test_api.py
d-ulker 80c5130
fix: remove API key logging in debug script
d-ulker 79b3d92
fix: pin package versions in Dockerfiles
d-ulker 25a4d55
fix: resolve local variable reference before assignment errors
d-ulker 09682d1
fix: resolve critical variable scoping and callable issues
d-ulker ee3a69d
fix: remove trailing whitespace from all files
d-ulker 2625330
Fix line length issues (FLK-E501) in core files
d-ulker d9e3de0
Fix more line length issues in data processing files
d-ulker 52444be
Fix most line length issues (FLK-E501) in src/ directory
d-ulker 1419d1e
Fix remaining line length issues (FLK-E501)
d-ulker 0906109
Fix deployment and API issues
d-ulker b6f9b09
Fix information disclosure vulnerability in health check
d-ulker feb140f
fix: implement REAL AI models across all services, remove all mocks
d-ulker a541fbf
feat: Add missing automated code quality tools
d-ulker 50e3f05
fix: resolve syntax errors in voice processing and summarization models
d-ulker fb6b93c
feat: resolve Cloud Build timeout issues and fix voice processing
d-ulker 240c768
fix: resolve demo website functionality issues
d-ulker 81f4e56
fix: resolve ReferenceError for generateSampleText function
d-ulker c768c2e
fix: resolve syntax error preventing generateSampleText from being av…
d-ulker a2e66fd
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] 83614fb
Add permissions block to fix security warning
d-ulker 28acd1f
Fix emotion labels derivation from model config
d-ulker 03d590a
fix: correct API request format to send JSON in POST body instead of …
d-ulker 064c642
Fix multiple code review issues: readiness flag, JSON truncation, and…
d-ulker 1889274
fix: resolve 404 errors by switching to local unified API server
d-ulker 7ab43d4
Fix 14 Python syntax errors: f-strings, string literals, and line con…
d-ulker b2cfee0
feat: apply automated code formatting and fix syntax errors
d-ulker a96f292
fix: resolve 11 critical syntax errors (FLK-E999) across voice proces…
d-ulker 65fa58d
feat: Add comprehensive demo website with DeBERTa v3 Large integration
deepsource-autofix[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Bandit security linter configuration for SAMO-DL project | ||
| # This file configures bandit to ignore false positives and focus on real security issues | ||
|
|
||
| [bandit] | ||
| # Keep B104 enabled; use inline `# nosec B104` on intentional 0.0.0.0 bindings. | ||
| # This ensures we catch real security issues while allowing intentional production bindings. | ||
|
|
||
| # B104: Binding to all interfaces - Use inline # nosec B104 only where 0.0.0.0 is strictly required | ||
| # (e.g., Cloud Run entrypoint) with proper justification in code comments. | ||
|
|
||
| # Include specific files and directories | ||
| include = src/, scripts/, deployment/ | ||
|
|
||
| # Exclude test files and build artifacts | ||
| exclude = tests/, build/, __pycache__/, .git/, .pytest_cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: Code Quality Checks | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop, feat/dl-* ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
|
|
||
| jobs: | ||
| quality-check: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: 'pip' | ||
| cache-dependency-path: | | ||
| pyproject.toml | ||
| requirements-dev.txt | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e .[dev] | ||
|
|
||
| - name: Run Black (Code Formatting) | ||
| run: black --check src/ tests/ scripts/ | ||
|
|
||
| - name: Run isort (Import Sorting) | ||
| run: isort --check-only src/ tests/ scripts/ | ||
|
|
||
| - name: Run Flake8 (Linting) | ||
| run: flake8 src/ tests/ scripts/ | ||
|
|
||
| - name: Run Pylint | ||
| run: pylint src/ tests/ scripts/ || true | ||
| continue-on-error: true | ||
|
|
||
| - name: Run MyPy (Type Checking) | ||
| run: mypy src/ tests/ scripts/ | ||
|
|
||
| - name: Run Bandit (Security) | ||
| run: bandit -r src/ scripts/ -f json -o bandit-report.json | ||
|
|
||
| - name: Run Safety (Vulnerability Check) | ||
| run: safety check --json --output safety-report.json || true | ||
| continue-on-error: true | ||
|
|
||
| - name: Run Tests | ||
| run: pytest tests/ --cov=src --cov-report=xml --cov-report=html --tb=short | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v4 | ||
| if: matrix.python-version == '3.11' | ||
| with: | ||
| file: ./coverage.xml | ||
| flags: unittests | ||
| name: codecov-umbrella | ||
| fail_ci_if_error: false | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| - name: Archive test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: test-results-${{ matrix.python-version }} | ||
| path: | | ||
| bandit-report.json | ||
| safety-report.json | ||
| coverage.xml | ||
| htmlcov/ | ||
| retention-days: 30 | ||
|
|
||
| quality-gate: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| needs: quality-check | ||
| if: always() | ||
|
|
||
| steps: | ||
| - name: Quality Gate Check | ||
| run: | | ||
| if [ "${{ needs.quality-check.result }}" = "failure" ]; then | ||
| echo "❌ Quality checks failed" | ||
| exit 1 | ||
| else | ||
| echo "✅ All quality checks passed" | ||
| fi | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Gitleaks configuration for SAMO-DL project | ||
| # This file configures gitleaks to ignore false positives for ML tokenizer imports | ||
|
|
||
| [allowlist] | ||
| # ML tokenizer imports - these are false positives for "generic-api-key" | ||
| # The word "tokenizer" in ML context refers to model components, not API keys | ||
| description = "ML tokenizer imports that are false positives for generic-api-key detection" | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "T5Tokenizer and T5ForConditionalGeneration imports" | ||
| regex = '''from transformers import T5Tokenizer, T5ForConditionalGeneration''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "AutoTokenizer and AutoModelForSequenceClassification imports" | ||
| regex = '''from transformers import AutoTokenizer, AutoModelForSequenceClassification''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "T5Tokenizer standalone import" | ||
| regex = '''from transformers import T5Tokenizer''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "AutoTokenizer standalone import" | ||
| regex = '''from transformers import AutoTokenizer''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "T5ForConditionalGeneration standalone import" | ||
| regex = '''from transformers import T5ForConditionalGeneration''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "AutoModelForSequenceClassification standalone import" | ||
| regex = '''from transformers import AutoModelForSequenceClassification''' | ||
|
|
||
| # Additional ML-related patterns that might trigger false positives | ||
| [[allowlist.rules]] | ||
| description = "Model loading with tokenizer references" | ||
| regex = '''tokenizer.*=.*from_pretrained''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "Tokenizer initialization patterns" | ||
| regex = '''AutoTokenizer\.from_pretrained''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "T5 tokenizer initialization patterns" | ||
| regex = '''T5Tokenizer\.from_pretrained''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "Model loading patterns with tokenizer" | ||
| regex = '''\.from_pretrained.*tokenizer''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "Tokenizer variable assignments" | ||
| regex = '''tokenizer\s*=\s*.*from_pretrained''' | ||
|
|
||
| # File-specific allowlist for known false positive files | ||
| [[allowlist.rules]] | ||
| description = "scripts/pre_download_models.py - ML model download script" | ||
| regex = '''scripts/pre_download_models\.py''' | ||
|
|
||
| [[allowlist.rules]] | ||
| description = "src/startup_api.py - ML model loading in API" | ||
| regex = '''src/startup_api\.py''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin GitHub Actions to commit SHAs (supply‑chain hardening).
actions/checkout, setup-python, codecov, upload-artifact should be pinned to immutable SHAs, not tags. I can open a quick PR with the correct SHAs for your exact versions.
Also applies to: 23-25, 63-63, 74-75
🤖 Prompt for AI Agents