Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Git
.git
.gitignore
.gitattributes

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.egg-info/
dist/
build/
*.egg

# Virtual environments
venv/
env/
ENV/
.venv

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Project specific
models/*.h5
models/*.pkl
data/*
outputs/
logs/
*.log

# Documentation
docs/_build/

# Tests
.pytest_cache/
.coverage
htmlcov/
.tox/

# OS
.DS_Store
Thumbs.db

# Jupyter
.ipynb_checkpoints/

# Temporary
*.tmp
*.bak
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

# Python files
[*.py]
indent_style = space
indent_size = 4
max_line_length = 100

# YAML files
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# JSON files
[*.json]
indent_style = space
indent_size = 2

# Markdown files
[*.md]
trim_trailing_whitespace = false
max_line_length = off

# Makefile
[Makefile]
indent_style = tab
51 changes: 51 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Environment Configuration Template
# Copy this file to .env and customize the values

# Model Configuration
MODEL_PATH=models/sentiment_lstm_model.h5
TOKENIZER_PATH=models/tokenizer.pkl
HISTORY_PATH=models/training_history.json

# Training Configuration
EPOCHS=5
BATCH_SIZE=128
LEARNING_RATE=0.001
VALIDATION_SPLIT=0.2

# Model Architecture
VOCAB_SIZE=10000
MAX_LENGTH=300
EMBEDDING_DIM=128
LSTM_UNITS_1=64
LSTM_UNITS_2=32
DROPOUT_RATE=0.5

# Logging
LOG_LEVEL=INFO
LOG_FILE=logs/sentiment_analysis.log

# Directories
DATA_DIR=data
MODELS_DIR=models
OUTPUTS_DIR=outputs
LOGS_DIR=logs

# TensorFlow Configuration
TF_CPP_MIN_LOG_LEVEL=2
CUDA_VISIBLE_DEVICES=0

# API Configuration (for FastAPI)
API_HOST=0.0.0.0
API_PORT=8000
API_WORKERS=4
API_RELOAD=false

# Database (optional, for production deployments)
# DATABASE_URL=postgresql://user:password@localhost/sentiment_db

# Redis (optional, for caching)
# REDIS_URL=redis://localhost:6379/0

# Monitoring (optional)
# SENTRY_DSN=https://...
# PROMETHEUS_PORT=9090
18 changes: 18 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[flake8]
max-line-length = 100
extend-ignore = E203, W503, E501
exclude =
.git,
__pycache__,
.venv,
venv,
.tox,
build,
dist,
*.egg-info,
.pytest_cache,
.mypy_cache
per-file-ignores =
__init__.py:F401
max-complexity = 10
docstring-convention = google
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

## Bug Description
A clear and concise description of what the bug is.

## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Run '....'
3. See error

## Expected Behavior
A clear and concise description of what you expected to happen.

## Actual Behavior
What actually happened.

## Error Messages/Logs
```
Paste any error messages or logs here
```

## Environment
- OS: [e.g., Ubuntu 20.04, Windows 10, macOS 12]
- Python Version: [e.g., 3.10.5]
- TensorFlow Version: [e.g., 2.10.0]
- Package Version: [e.g., 1.0.0]

## Additional Context
Add any other context about the problem here, such as:
- Screenshots
- Related issues
- Possible solutions you've tried
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Is your feature request related to a problem?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like
A clear and concise description of what you want to happen.

## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

## Additional context
Add any other context, screenshots, or examples about the feature request here.

## Potential Implementation
If you have ideas about how to implement this feature, please share them here.
34 changes: 34 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Description
Please include a summary of the changes and which issue is fixed. Include relevant motivation and context.

Fixes # (issue)

## Type of Change
Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring

## How Has This Been Tested?
Please describe the tests that you ran to verify your changes.

- [ ] Test A
- [ ] Test B

## Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Screenshots (if appropriate)

## Additional Notes
Loading
Loading