Spaces:
Runtime error
Runtime error
chore: Update project configuration
Browse files- .editorconfig +4 -0
- .gitignore +4 -1
- justfile +7 -3
- poetry.lock +0 -0
- pyproject.toml +14 -0
.editorconfig
CHANGED
|
@@ -16,6 +16,10 @@ trim_trailing_whitespace = true
|
|
| 16 |
[*.py]
|
| 17 |
indent_size = 4
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
# Override rules for markdown
|
| 20 |
[*.md]
|
| 21 |
# trailing whitespace is significant in markdown -> do not remove
|
|
|
|
| 16 |
[*.py]
|
| 17 |
indent_size = 4
|
| 18 |
|
| 19 |
+
# Override rules for Juptyer notebooks
|
| 20 |
+
[*.ipynb]
|
| 21 |
+
indent_size = 4
|
| 22 |
+
|
| 23 |
# Override rules for markdown
|
| 24 |
[*.md]
|
| 25 |
# trailing whitespace is significant in markdown -> do not remove
|
.gitignore
CHANGED
|
@@ -193,5 +193,8 @@ pyrightconfig.json
|
|
| 193 |
|
| 194 |
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
|
| 195 |
|
| 196 |
-
#
|
| 197 |
data/
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
|
| 195 |
|
| 196 |
+
# Custom
|
| 197 |
data/
|
| 198 |
+
cache/
|
| 199 |
+
models/
|
| 200 |
+
flagged/
|
justfile
CHANGED
|
@@ -7,13 +7,17 @@
|
|
| 7 |
poetry run pre-commit run --all-files
|
| 8 |
|
| 9 |
@install:
|
| 10 |
-
poetry install --
|
| 11 |
|
| 12 |
@install-dev:
|
|
|
|
| 13 |
poetry install
|
| 14 |
|
| 15 |
@requirements:
|
| 16 |
poetry export -f requirements.txt --output requirements.txt --without dev
|
| 17 |
|
| 18 |
-
@run TEXT:
|
| 19 |
-
poetry run python main.py {{TEXT}}
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
poetry run pre-commit run --all-files
|
| 8 |
|
| 9 |
@install:
|
| 10 |
+
poetry install --only main
|
| 11 |
|
| 12 |
@install-dev:
|
| 13 |
+
poetry self add poetry-plugin-export
|
| 14 |
poetry install
|
| 15 |
|
| 16 |
@requirements:
|
| 17 |
poetry export -f requirements.txt --output requirements.txt --without dev
|
| 18 |
|
| 19 |
+
@run +TEXT:
|
| 20 |
+
poetry run python main.py predict --model models/logistic_regression.pkl "{{TEXT}}"
|
| 21 |
+
|
| 22 |
+
@gui:
|
| 23 |
+
poetry run gradio app/gui.py
|
poetry.lock
CHANGED
|
Binary files a/poetry.lock and b/poetry.lock differ
|
|
|
pyproject.toml
CHANGED
|
@@ -1,10 +1,18 @@
|
|
| 1 |
[tool.poetry]
|
| 2 |
name = "sentiment-analysis"
|
| 3 |
package-mode = false
|
|
|
|
| 4 |
|
| 5 |
[tool.poetry.dependencies]
|
| 6 |
python = "^3.12"
|
| 7 |
click = "^8.1.7"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
[tool.poetry.group.dev.dependencies]
|
| 10 |
ruff = "^0.4.1"
|
|
@@ -18,6 +26,7 @@ build-backend = "poetry.core.masonry.api"
|
|
| 18 |
|
| 19 |
[tool.ruff]
|
| 20 |
extend-include = ["*.ipynb"]
|
|
|
|
| 21 |
line-length = 120
|
| 22 |
indent-width = 4
|
| 23 |
|
|
@@ -97,6 +106,8 @@ ignore = [
|
|
| 97 |
"PT",
|
| 98 |
"TD",
|
| 99 |
"PERF203", # ignore for now; investigate
|
|
|
|
|
|
|
| 100 |
]
|
| 101 |
select = ["ALL"]
|
| 102 |
# Allow unused variables when underscore-prefixed
|
|
@@ -108,6 +119,9 @@ convention = "google"
|
|
| 108 |
[tool.ruff.lint.mccabe]
|
| 109 |
max-complexity = 12
|
| 110 |
|
|
|
|
|
|
|
|
|
|
| 111 |
[tool.ruff.format]
|
| 112 |
docstring-code-format = true
|
| 113 |
|
|
|
|
| 1 |
[tool.poetry]
|
| 2 |
name = "sentiment-analysis"
|
| 3 |
package-mode = false
|
| 4 |
+
packages = [{ include = "app" }]
|
| 5 |
|
| 6 |
[tool.poetry.dependencies]
|
| 7 |
python = "^3.12"
|
| 8 |
click = "^8.1.7"
|
| 9 |
+
scikit-learn = "^1.4.2"
|
| 10 |
+
gradio = "^4.31.0"
|
| 11 |
+
|
| 12 |
+
[tool.poetry.group.train.dependencies]
|
| 13 |
+
pandas = "^2.2.2"
|
| 14 |
+
numpy = "^1.26.4"
|
| 15 |
+
seaborn = "^0.13.2"
|
| 16 |
|
| 17 |
[tool.poetry.group.dev.dependencies]
|
| 18 |
ruff = "^0.4.1"
|
|
|
|
| 26 |
|
| 27 |
[tool.ruff]
|
| 28 |
extend-include = ["*.ipynb"]
|
| 29 |
+
src = ["app"]
|
| 30 |
line-length = 120
|
| 31 |
indent-width = 4
|
| 32 |
|
|
|
|
| 106 |
"PT",
|
| 107 |
"TD",
|
| 108 |
"PERF203", # ignore for now; investigate
|
| 109 |
+
"T201", # print
|
| 110 |
+
"ANN204", # missing-return-type-special-method
|
| 111 |
]
|
| 112 |
select = ["ALL"]
|
| 113 |
# Allow unused variables when underscore-prefixed
|
|
|
|
| 119 |
[tool.ruff.lint.mccabe]
|
| 120 |
max-complexity = 12
|
| 121 |
|
| 122 |
+
[tool.ruff.lint.isort]
|
| 123 |
+
known-first-party = ["app"]
|
| 124 |
+
|
| 125 |
[tool.ruff.format]
|
| 126 |
docstring-code-format = true
|
| 127 |
|