File size: 4,122 Bytes
2cad7c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "llm_topic_modelling"
version = "0.6.0"
description = "Generate thematic summaries from open text in tabular data files with a large language model."
requires-python = ">=3.10"
readme = "README.md"
authors = [
    { name = "Sean Pedrick-Case", email = "spedrickcase@lambeth.gov.uk" },
]
maintainers = [
    { name = "Sean Pedrick-Case", email = "spedrickcase@lambeth.gov.uk" },
]
keywords = [
    "topic-modelling",
    "topic-modeling",
    "llm",
    "large-language-models",
    "thematic-analysis",
    "text-analysis",
    "nlp",
    "natural-language-processing",
    "text-summarization",
    "text-summarisation",
    "thematic-summaries",
    "gradio",
    "data-analysis",
    "tabular-data",
    "excel",
    "csv",
    "open-text",
    "text-mining"
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Information Technology",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Text Processing :: Linguistic",
    "Topic :: Text Processing :: Markup",
    "Topic :: Scientific/Engineering :: Information Analysis",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
]

dependencies = [    
    "gradio==6.0.2",
    "transformers==4.57.2",
    "spaces==0.42.1",
    "boto3==1.42.1",
    "pandas<=2.3.3",
    "pyarrow>=21.0.0",
    "openpyxl>=3.1.5",
    "markdown>=3.7",
    "tabulate>=0.9.0",
    "lxml>=5.3.0",
    "google-genai<=1.52.0",
    "openai<=2.8.1",
    "html5lib>=1.1",
    "beautifulsoup4>=4.12.3",
    "rapidfuzz>=3.13.0",
    "python-dotenv>=1.1.0"
]

[project.optional-dependencies]
dev = ["pytest"]
test = ["pytest", "pytest-cov"]

# Extra dependencies for VLM models
# For torch you should use --index-url https://download.pytorch.org/whl/cu128. Additionally installs the unsloth package
torch = [
    "torch<=2.9.1",
    "torchvision",
    "accelerate",
    "bitsandbytes",
    "unsloth==2025.11.6",
    "unsloth_zoo==2025.11.6",
    "timm",
    "xformers"
]

# If you want to install llama-cpp-python in GPU mode, use cmake.args="-DGGML_CUDA=on" . If that doesn't work, try specific wheels for your system, e.g. for Linux see files in https://github.com/JamePeng/llama-cpp-python/releases. More details on installation here: https://llama-cpp-python.readthedocs.io/en/latest
llamacpp = [
    "llama-cpp-python>=0.3.16",
]

# Run Gradio as an mcp server
mcp = [
    "gradio[mcp]==6.0.2"
]

[project.urls]
Homepage = "https://github.com/seanpedrick-case/llm_topic_modelling"
repository = "https://github.com/seanpedrick-case/llm_topic_modelling"

[tool.setuptools]
packages = ["tools"]
py-modules = ["app"]

# Configuration for Ruff linter:
[tool.ruff]
line-length = 88

[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = [
    "E501",  # line-too-long (handled with Black)
    "E402",  # module-import-not-at-top-of-file (sometimes needed for conditional imports)
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]  # Allow unused imports in __init__.py

# Configuration for a Black formatter:
[tool.black]
line-length = 88
target-version = ['py310']

# Configuration for pytest:
[tool.pytest.ini_options]
filterwarnings = [
    "ignore::DeprecationWarning:click.parser",
    "ignore::DeprecationWarning:weasel.util.config",
    "ignore::DeprecationWarning:builtin type",
    "ignore::DeprecationWarning:websockets.legacy",
    "ignore::DeprecationWarning:websockets.server",
    "ignore::DeprecationWarning:spacy.cli._util",
    "ignore::DeprecationWarning:weasel.util.config",
    "ignore::DeprecationWarning:importlib._bootstrap",
]
testpaths = ["test"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "-v",
    "--tb=short",
    "--strict-markers",
    "--disable-warnings",
]