docker container, python 3.10, moved output folder
Browse files- .dockerignore +7 -0
- .gitignore +1 -1
- Dockerfile +42 -0
- README.md +9 -0
- poetry.lock +81 -51
- pyproject.toml +1 -1
- ragntex.py +5 -1
- src/processing/output_folder.py +2 -3
- src/services/generator.py +0 -1
.dockerignore
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__
|
| 2 |
+
*.pyc
|
| 3 |
+
*.pyo
|
| 4 |
+
*.pyd
|
| 5 |
+
*.db
|
| 6 |
+
.env
|
| 7 |
+
.venv
|
.gitignore
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
.DS_Store
|
| 3 |
activate_poetry.sh
|
| 4 |
uploaded_docs/*
|
| 5 |
-
|
| 6 |
|
| 7 |
# Byte-compiled / optimized / DLL files
|
| 8 |
__pycache__/
|
|
|
|
| 2 |
.DS_Store
|
| 3 |
activate_poetry.sh
|
| 4 |
uploaded_docs/*
|
| 5 |
+
output/*
|
| 6 |
|
| 7 |
# Byte-compiled / optimized / DLL files
|
| 8 |
__pycache__/
|
Dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python base image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
+
ENV PYTHONUNBUFFERED=1
|
| 7 |
+
|
| 8 |
+
# Set work directory
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# Install system dependencies
|
| 12 |
+
RUN apt-get update && apt-get install -y \
|
| 13 |
+
build-essential \
|
| 14 |
+
libgl1-mesa-glx \
|
| 15 |
+
libglib2.0-0 \
|
| 16 |
+
texlive-latex-base \
|
| 17 |
+
texlive-fonts-recommended \
|
| 18 |
+
texlive-latex-extra \
|
| 19 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
+
|
| 21 |
+
# Clean up
|
| 22 |
+
RUN rm -rf /var/lib/apt/lists/*
|
| 23 |
+
|
| 24 |
+
# Install Poetry
|
| 25 |
+
RUN pip install --upgrade pip
|
| 26 |
+
RUN pip install poetry
|
| 27 |
+
|
| 28 |
+
# Copy only poetry files first (for caching)
|
| 29 |
+
COPY pyproject.toml poetry.lock* /app/
|
| 30 |
+
|
| 31 |
+
# Install dependencies
|
| 32 |
+
RUN poetry config virtualenvs.create false \
|
| 33 |
+
&& poetry install --no-root --no-interaction --no-ansi
|
| 34 |
+
|
| 35 |
+
# Copy the rest of the application
|
| 36 |
+
COPY . /app
|
| 37 |
+
|
| 38 |
+
# Expose Gradio port
|
| 39 |
+
EXPOSE 7860
|
| 40 |
+
|
| 41 |
+
# Command to run the app
|
| 42 |
+
CMD ["python", "ragntex.py"]
|
README.md
CHANGED
|
@@ -42,3 +42,12 @@ The model outputs fully formatted compilable LaTeX code following a clear and co
|
|
| 42 |
- **Summary**: Key takeaways
|
| 43 |
|
| 44 |
It also incorporates relevant images extracted from the documents, organizing them into LaTeX Beamer-friendly layouts (e.g., *Core Idea 2* and *Core Idea 3* slide formats).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
- **Summary**: Key takeaways
|
| 43 |
|
| 44 |
It also incorporates relevant images extracted from the documents, organizing them into LaTeX Beamer-friendly layouts (e.g., *Core Idea 2* and *Core Idea 3* slide formats).
|
| 45 |
+
|
| 46 |
+
### Run docker:
|
| 47 |
+
```bash
|
| 48 |
+
docker run \
|
| 49 |
+
--env-file .env \
|
| 50 |
+
-e IN_DOCKER=true \
|
| 51 |
+
-p 7860:7860 \
|
| 52 |
+
-v /Users/annaershova/Documents/Projects/CapstoneGenAi/RAGnTeX/output:/app/output \
|
| 53 |
+
ragntex
|
poetry.lock
CHANGED
|
@@ -37,8 +37,10 @@ files = [
|
|
| 37 |
]
|
| 38 |
|
| 39 |
[package.dependencies]
|
|
|
|
| 40 |
idna = ">=2.8"
|
| 41 |
sniffio = ">=1.1"
|
|
|
|
| 42 |
|
| 43 |
[package.extras]
|
| 44 |
doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"]
|
|
@@ -57,6 +59,9 @@ files = [
|
|
| 57 |
{file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"},
|
| 58 |
]
|
| 59 |
|
|
|
|
|
|
|
|
|
|
| 60 |
[package.extras]
|
| 61 |
tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"]
|
| 62 |
|
|
@@ -72,6 +77,9 @@ files = [
|
|
| 72 |
{file = "astroid-3.3.10.tar.gz", hash = "sha256:c332157953060c6deb9caa57303ae0d20b0fbdb2e59b4a4f2a6ba49d0a7961ce"},
|
| 73 |
]
|
| 74 |
|
|
|
|
|
|
|
|
|
|
| 75 |
[[package]]
|
| 76 |
name = "attrs"
|
| 77 |
version = "25.3.0"
|
|
@@ -92,49 +100,6 @@ docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphi
|
|
| 92 |
tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"]
|
| 93 |
tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""]
|
| 94 |
|
| 95 |
-
[[package]]
|
| 96 |
-
name = "audioop-lts"
|
| 97 |
-
version = "0.2.1"
|
| 98 |
-
description = "LTS Port of Python audioop"
|
| 99 |
-
optional = false
|
| 100 |
-
python-versions = ">=3.13"
|
| 101 |
-
groups = ["main"]
|
| 102 |
-
files = [
|
| 103 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-macosx_10_13_universal2.whl", hash = "sha256:fd1345ae99e17e6910f47ce7d52673c6a1a70820d78b67de1b7abb3af29c426a"},
|
| 104 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-macosx_10_13_x86_64.whl", hash = "sha256:e175350da05d2087e12cea8e72a70a1a8b14a17e92ed2022952a4419689ede5e"},
|
| 105 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-macosx_11_0_arm64.whl", hash = "sha256:4a8dd6a81770f6ecf019c4b6d659e000dc26571b273953cef7cd1d5ce2ff3ae6"},
|
| 106 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1cd3c0b6f2ca25c7d2b1c3adeecbe23e65689839ba73331ebc7d893fcda7ffe"},
|
| 107 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff3f97b3372c97782e9c6d3d7fdbe83bce8f70de719605bd7ee1839cd1ab360a"},
|
| 108 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a351af79edefc2a1bd2234bfd8b339935f389209943043913a919df4b0f13300"},
|
| 109 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2aeb6f96f7f6da80354330470b9134d81b4cf544cdd1c549f2f45fe964d28059"},
|
| 110 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c589f06407e8340e81962575fcffbba1e92671879a221186c3d4662de9fe804e"},
|
| 111 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fbae5d6925d7c26e712f0beda5ed69ebb40e14212c185d129b8dfbfcc335eb48"},
|
| 112 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_i686.whl", hash = "sha256:d2d5434717f33117f29b5691fbdf142d36573d751716249a288fbb96ba26a281"},
|
| 113 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:f626a01c0a186b08f7ff61431c01c055961ee28769591efa8800beadd27a2959"},
|
| 114 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_s390x.whl", hash = "sha256:05da64e73837f88ee5c6217d732d2584cf638003ac72df124740460531e95e47"},
|
| 115 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:56b7a0a4dba8e353436f31a932f3045d108a67b5943b30f85a5563f4d8488d77"},
|
| 116 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-win32.whl", hash = "sha256:6e899eb8874dc2413b11926b5fb3857ec0ab55222840e38016a6ba2ea9b7d5e3"},
|
| 117 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-win_amd64.whl", hash = "sha256:64562c5c771fb0a8b6262829b9b4f37a7b886c01b4d3ecdbae1d629717db08b4"},
|
| 118 |
-
{file = "audioop_lts-0.2.1-cp313-abi3-win_arm64.whl", hash = "sha256:c45317debeb64002e980077642afbd977773a25fa3dfd7ed0c84dccfc1fafcb0"},
|
| 119 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:3827e3fce6fee4d69d96a3d00cd2ab07f3c0d844cb1e44e26f719b34a5b15455"},
|
| 120 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:161249db9343b3c9780ca92c0be0d1ccbfecdbccac6844f3d0d44b9c4a00a17f"},
|
| 121 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5b7b4ff9de7a44e0ad2618afdc2ac920b91f4a6d3509520ee65339d4acde5abf"},
|
| 122 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72e37f416adb43b0ced93419de0122b42753ee74e87070777b53c5d2241e7fab"},
|
| 123 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:534ce808e6bab6adb65548723c8cbe189a3379245db89b9d555c4210b4aaa9b6"},
|
| 124 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2de9b6fb8b1cf9f03990b299a9112bfdf8b86b6987003ca9e8a6c4f56d39543"},
|
| 125 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f24865991b5ed4b038add5edbf424639d1358144f4e2a3e7a84bc6ba23e35074"},
|
| 126 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bdb3b7912ccd57ea53197943f1bbc67262dcf29802c4a6df79ec1c715d45a78"},
|
| 127 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:120678b208cca1158f0a12d667af592e067f7a50df9adc4dc8f6ad8d065a93fb"},
|
| 128 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:54cd4520fc830b23c7d223693ed3e1b4d464997dd3abc7c15dce9a1f9bd76ab2"},
|
| 129 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:d6bd20c7a10abcb0fb3d8aaa7508c0bf3d40dfad7515c572014da4b979d3310a"},
|
| 130 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:f0ed1ad9bd862539ea875fb339ecb18fcc4148f8d9908f4502df28f94d23491a"},
|
| 131 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e1af3ff32b8c38a7d900382646e91f2fc515fd19dea37e9392275a5cbfdbff63"},
|
| 132 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-win32.whl", hash = "sha256:f51bb55122a89f7a0817d7ac2319744b4640b5b446c4c3efcea5764ea99ae509"},
|
| 133 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f0f2f336aa2aee2bce0b0dcc32bbba9178995454c7b979cf6ce086a8801e14c7"},
|
| 134 |
-
{file = "audioop_lts-0.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:78bfb3703388c780edf900be66e07de5a3d4105ca8e8720c5c4d67927e0b15d0"},
|
| 135 |
-
{file = "audioop_lts-0.2.1.tar.gz", hash = "sha256:e81268da0baa880431b68b1308ab7257eb33f356e57a5f9b1f915dfb13dd1387"},
|
| 136 |
-
]
|
| 137 |
-
|
| 138 |
[[package]]
|
| 139 |
name = "backoff"
|
| 140 |
version = "1.11.1"
|
|
@@ -249,8 +214,10 @@ files = [
|
|
| 249 |
|
| 250 |
[package.dependencies]
|
| 251 |
colorama = {version = "*", markers = "os_name == \"nt\""}
|
|
|
|
| 252 |
packaging = ">=19.1"
|
| 253 |
pyproject_hooks = "*"
|
|
|
|
| 254 |
|
| 255 |
[package.extras]
|
| 256 |
docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"]
|
|
@@ -592,6 +559,24 @@ files = [
|
|
| 592 |
{file = "durationpy-0.9.tar.gz", hash = "sha256:fd3feb0a69a0057d582ef643c355c40d2fa1c942191f914d12203b1a01ac722a"},
|
| 593 |
]
|
| 594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
[[package]]
|
| 596 |
name = "fastapi"
|
| 597 |
version = "0.115.9"
|
|
@@ -723,7 +708,7 @@ files = [
|
|
| 723 |
[package.dependencies]
|
| 724 |
google-auth = ">=2.14.1,<3.0.0"
|
| 725 |
googleapis-common-protos = ">=1.56.2,<2.0.0"
|
| 726 |
-
proto-plus =
|
| 727 |
protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
| 728 |
requests = ">=2.18.0,<3.0.0"
|
| 729 |
|
|
@@ -849,7 +834,6 @@ files = [
|
|
| 849 |
[package.dependencies]
|
| 850 |
aiofiles = ">=22.0,<25.0"
|
| 851 |
anyio = ">=3.0,<5.0"
|
| 852 |
-
audioop-lts = {version = "<1.0", markers = "python_version >= \"3.13\""}
|
| 853 |
fastapi = ">=0.115.2,<1.0"
|
| 854 |
ffmpy = "*"
|
| 855 |
gradio-client = "1.9.1"
|
|
@@ -1758,7 +1742,7 @@ files = [
|
|
| 1758 |
[package.dependencies]
|
| 1759 |
deprecated = ">=1.2.6"
|
| 1760 |
googleapis-common-protos = ">=1.52,<2.0"
|
| 1761 |
-
grpcio = {version = ">=1.
|
| 1762 |
opentelemetry-api = ">=1.15,<2.0"
|
| 1763 |
opentelemetry-exporter-otlp-proto-common = "1.33.1"
|
| 1764 |
opentelemetry-proto = "1.33.1"
|
|
@@ -2041,7 +2025,7 @@ files = [
|
|
| 2041 |
]
|
| 2042 |
|
| 2043 |
[package.dependencies]
|
| 2044 |
-
numpy = {version = ">=1.
|
| 2045 |
python-dateutil = ">=2.8.2"
|
| 2046 |
pytz = ">=2020.1"
|
| 2047 |
tzdata = ">=2022.7"
|
|
@@ -2456,10 +2440,11 @@ files = [
|
|
| 2456 |
[package.dependencies]
|
| 2457 |
astroid = ">=3.3.8,<=3.4.0.dev0"
|
| 2458 |
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
| 2459 |
-
dill = {version = ">=0.
|
| 2460 |
isort = ">=4.2.5,<5.13 || >5.13,<7"
|
| 2461 |
mccabe = ">=0.6,<0.8"
|
| 2462 |
platformdirs = ">=2.2"
|
|
|
|
| 2463 |
tomlkit = ">=0.10.1"
|
| 2464 |
|
| 2465 |
[package.extras]
|
|
@@ -2670,6 +2655,7 @@ files = [
|
|
| 2670 |
[package.dependencies]
|
| 2671 |
attrs = ">=22.2.0"
|
| 2672 |
rpds-py = ">=0.7.0"
|
|
|
|
| 2673 |
|
| 2674 |
[[package]]
|
| 2675 |
name = "requests"
|
|
@@ -2727,6 +2713,7 @@ files = [
|
|
| 2727 |
[package.dependencies]
|
| 2728 |
markdown-it-py = ">=2.2.0"
|
| 2729 |
pygments = ">=2.13.0,<3.0.0"
|
|
|
|
| 2730 |
|
| 2731 |
[package.extras]
|
| 2732 |
jupyter = ["ipywidgets (>=7.5.1,<9)"]
|
|
@@ -3085,6 +3072,48 @@ dev = ["tokenizers[testing]"]
|
|
| 3085 |
docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"]
|
| 3086 |
testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests", "ruff"]
|
| 3087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3088 |
[[package]]
|
| 3089 |
name = "tomlkit"
|
| 3090 |
version = "0.13.2"
|
|
@@ -3143,7 +3172,7 @@ version = "4.13.2"
|
|
| 3143 |
description = "Backported and Experimental Type Hints for Python 3.8+"
|
| 3144 |
optional = false
|
| 3145 |
python-versions = ">=3.8"
|
| 3146 |
-
groups = ["main"]
|
| 3147 |
files = [
|
| 3148 |
{file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"},
|
| 3149 |
{file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"},
|
|
@@ -3225,6 +3254,7 @@ h11 = ">=0.8"
|
|
| 3225 |
httptools = {version = ">=0.6.3", optional = true, markers = "extra == \"standard\""}
|
| 3226 |
python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""}
|
| 3227 |
pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""}
|
|
|
|
| 3228 |
uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""}
|
| 3229 |
watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""}
|
| 3230 |
websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""}
|
|
@@ -3576,5 +3606,5 @@ type = ["pytest-mypy"]
|
|
| 3576 |
|
| 3577 |
[metadata]
|
| 3578 |
lock-version = "2.1"
|
| 3579 |
-
python-versions = ">=3.
|
| 3580 |
-
content-hash = "
|
|
|
|
| 37 |
]
|
| 38 |
|
| 39 |
[package.dependencies]
|
| 40 |
+
exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""}
|
| 41 |
idna = ">=2.8"
|
| 42 |
sniffio = ">=1.1"
|
| 43 |
+
typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""}
|
| 44 |
|
| 45 |
[package.extras]
|
| 46 |
doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"]
|
|
|
|
| 59 |
{file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"},
|
| 60 |
]
|
| 61 |
|
| 62 |
+
[package.dependencies]
|
| 63 |
+
typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""}
|
| 64 |
+
|
| 65 |
[package.extras]
|
| 66 |
tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"]
|
| 67 |
|
|
|
|
| 77 |
{file = "astroid-3.3.10.tar.gz", hash = "sha256:c332157953060c6deb9caa57303ae0d20b0fbdb2e59b4a4f2a6ba49d0a7961ce"},
|
| 78 |
]
|
| 79 |
|
| 80 |
+
[package.dependencies]
|
| 81 |
+
typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""}
|
| 82 |
+
|
| 83 |
[[package]]
|
| 84 |
name = "attrs"
|
| 85 |
version = "25.3.0"
|
|
|
|
| 100 |
tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"]
|
| 101 |
tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""]
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
[[package]]
|
| 104 |
name = "backoff"
|
| 105 |
version = "1.11.1"
|
|
|
|
| 214 |
|
| 215 |
[package.dependencies]
|
| 216 |
colorama = {version = "*", markers = "os_name == \"nt\""}
|
| 217 |
+
importlib-metadata = {version = ">=4.6", markers = "python_full_version < \"3.10.2\""}
|
| 218 |
packaging = ">=19.1"
|
| 219 |
pyproject_hooks = "*"
|
| 220 |
+
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
| 221 |
|
| 222 |
[package.extras]
|
| 223 |
docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"]
|
|
|
|
| 559 |
{file = "durationpy-0.9.tar.gz", hash = "sha256:fd3feb0a69a0057d582ef643c355c40d2fa1c942191f914d12203b1a01ac722a"},
|
| 560 |
]
|
| 561 |
|
| 562 |
+
[[package]]
|
| 563 |
+
name = "exceptiongroup"
|
| 564 |
+
version = "1.3.0"
|
| 565 |
+
description = "Backport of PEP 654 (exception groups)"
|
| 566 |
+
optional = false
|
| 567 |
+
python-versions = ">=3.7"
|
| 568 |
+
groups = ["main"]
|
| 569 |
+
files = [
|
| 570 |
+
{file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"},
|
| 571 |
+
{file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"},
|
| 572 |
+
]
|
| 573 |
+
|
| 574 |
+
[package.dependencies]
|
| 575 |
+
typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""}
|
| 576 |
+
|
| 577 |
+
[package.extras]
|
| 578 |
+
test = ["pytest (>=6)"]
|
| 579 |
+
|
| 580 |
[[package]]
|
| 581 |
name = "fastapi"
|
| 582 |
version = "0.115.9"
|
|
|
|
| 708 |
[package.dependencies]
|
| 709 |
google-auth = ">=2.14.1,<3.0.0"
|
| 710 |
googleapis-common-protos = ">=1.56.2,<2.0.0"
|
| 711 |
+
proto-plus = ">=1.22.3,<2.0.0"
|
| 712 |
protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0"
|
| 713 |
requests = ">=2.18.0,<3.0.0"
|
| 714 |
|
|
|
|
| 834 |
[package.dependencies]
|
| 835 |
aiofiles = ">=22.0,<25.0"
|
| 836 |
anyio = ">=3.0,<5.0"
|
|
|
|
| 837 |
fastapi = ">=0.115.2,<1.0"
|
| 838 |
ffmpy = "*"
|
| 839 |
gradio-client = "1.9.1"
|
|
|
|
| 1742 |
[package.dependencies]
|
| 1743 |
deprecated = ">=1.2.6"
|
| 1744 |
googleapis-common-protos = ">=1.52,<2.0"
|
| 1745 |
+
grpcio = {version = ">=1.63.2,<2.0.0", markers = "python_version < \"3.13\""}
|
| 1746 |
opentelemetry-api = ">=1.15,<2.0"
|
| 1747 |
opentelemetry-exporter-otlp-proto-common = "1.33.1"
|
| 1748 |
opentelemetry-proto = "1.33.1"
|
|
|
|
| 2025 |
]
|
| 2026 |
|
| 2027 |
[package.dependencies]
|
| 2028 |
+
numpy = {version = ">=1.22.4", markers = "python_version < \"3.11\""}
|
| 2029 |
python-dateutil = ">=2.8.2"
|
| 2030 |
pytz = ">=2020.1"
|
| 2031 |
tzdata = ">=2022.7"
|
|
|
|
| 2440 |
[package.dependencies]
|
| 2441 |
astroid = ">=3.3.8,<=3.4.0.dev0"
|
| 2442 |
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
| 2443 |
+
dill = {version = ">=0.2", markers = "python_version < \"3.11\""}
|
| 2444 |
isort = ">=4.2.5,<5.13 || >5.13,<7"
|
| 2445 |
mccabe = ">=0.6,<0.8"
|
| 2446 |
platformdirs = ">=2.2"
|
| 2447 |
+
tomli = {version = ">=1.1", markers = "python_version < \"3.11\""}
|
| 2448 |
tomlkit = ">=0.10.1"
|
| 2449 |
|
| 2450 |
[package.extras]
|
|
|
|
| 2655 |
[package.dependencies]
|
| 2656 |
attrs = ">=22.2.0"
|
| 2657 |
rpds-py = ">=0.7.0"
|
| 2658 |
+
typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""}
|
| 2659 |
|
| 2660 |
[[package]]
|
| 2661 |
name = "requests"
|
|
|
|
| 2713 |
[package.dependencies]
|
| 2714 |
markdown-it-py = ">=2.2.0"
|
| 2715 |
pygments = ">=2.13.0,<3.0.0"
|
| 2716 |
+
typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.11\""}
|
| 2717 |
|
| 2718 |
[package.extras]
|
| 2719 |
jupyter = ["ipywidgets (>=7.5.1,<9)"]
|
|
|
|
| 3072 |
docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"]
|
| 3073 |
testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests", "ruff"]
|
| 3074 |
|
| 3075 |
+
[[package]]
|
| 3076 |
+
name = "tomli"
|
| 3077 |
+
version = "2.2.1"
|
| 3078 |
+
description = "A lil' TOML parser"
|
| 3079 |
+
optional = false
|
| 3080 |
+
python-versions = ">=3.8"
|
| 3081 |
+
groups = ["main", "dev"]
|
| 3082 |
+
files = [
|
| 3083 |
+
{file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
|
| 3084 |
+
{file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
|
| 3085 |
+
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
|
| 3086 |
+
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
|
| 3087 |
+
{file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
|
| 3088 |
+
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
|
| 3089 |
+
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
|
| 3090 |
+
{file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
|
| 3091 |
+
{file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
|
| 3092 |
+
{file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
|
| 3093 |
+
{file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
|
| 3094 |
+
{file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
|
| 3095 |
+
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
|
| 3096 |
+
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
|
| 3097 |
+
{file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
|
| 3098 |
+
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
|
| 3099 |
+
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
|
| 3100 |
+
{file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
|
| 3101 |
+
{file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
|
| 3102 |
+
{file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
|
| 3103 |
+
{file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
|
| 3104 |
+
{file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
|
| 3105 |
+
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
|
| 3106 |
+
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
|
| 3107 |
+
{file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
|
| 3108 |
+
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
|
| 3109 |
+
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
|
| 3110 |
+
{file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
|
| 3111 |
+
{file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
|
| 3112 |
+
{file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
|
| 3113 |
+
{file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
|
| 3114 |
+
{file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
|
| 3115 |
+
]
|
| 3116 |
+
|
| 3117 |
[[package]]
|
| 3118 |
name = "tomlkit"
|
| 3119 |
version = "0.13.2"
|
|
|
|
| 3172 |
description = "Backported and Experimental Type Hints for Python 3.8+"
|
| 3173 |
optional = false
|
| 3174 |
python-versions = ">=3.8"
|
| 3175 |
+
groups = ["main", "dev"]
|
| 3176 |
files = [
|
| 3177 |
{file = "typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c"},
|
| 3178 |
{file = "typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef"},
|
|
|
|
| 3254 |
httptools = {version = ">=0.6.3", optional = true, markers = "extra == \"standard\""}
|
| 3255 |
python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""}
|
| 3256 |
pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""}
|
| 3257 |
+
typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""}
|
| 3258 |
uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""}
|
| 3259 |
watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""}
|
| 3260 |
websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""}
|
|
|
|
| 3606 |
|
| 3607 |
[metadata]
|
| 3608 |
lock-version = "2.1"
|
| 3609 |
+
python-versions = ">=3.10,<3.11"
|
| 3610 |
+
content-hash = "2bf0903eb5a87da022e3ba0fc805c42e1b32a7bf60600329bc788ef72651af70"
|
pyproject.toml
CHANGED
|
@@ -8,7 +8,7 @@ authors = [
|
|
| 8 |
]
|
| 9 |
license = {text = "Apache 2.0"}
|
| 10 |
readme = "README.md"
|
| 11 |
-
requires-python = ">=3.
|
| 12 |
dependencies = [
|
| 13 |
"google-genai (==1.11.0)",
|
| 14 |
"chromadb (==1.0.5)",
|
|
|
|
| 8 |
]
|
| 9 |
license = {text = "Apache 2.0"}
|
| 10 |
readme = "README.md"
|
| 11 |
+
requires-python = ">=3.10,<3.11"
|
| 12 |
dependencies = [
|
| 13 |
"google-genai (==1.11.0)",
|
| 14 |
"chromadb (==1.0.5)",
|
ragntex.py
CHANGED
|
@@ -1,8 +1,12 @@
|
|
| 1 |
"""RAGnTex: A Retrieval-Augmented Generation for LaTeX Documents"""
|
| 2 |
|
|
|
|
| 3 |
from src import demo, init_telemetry
|
| 4 |
|
| 5 |
# Setup OpenTelemetry
|
| 6 |
init_telemetry()
|
| 7 |
# Run Gradio
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
"""RAGnTex: A Retrieval-Augmented Generation for LaTeX Documents"""
|
| 2 |
|
| 3 |
+
import os
|
| 4 |
from src import demo, init_telemetry
|
| 5 |
|
| 6 |
# Setup OpenTelemetry
|
| 7 |
init_telemetry()
|
| 8 |
# Run Gradio
|
| 9 |
+
if os.getenv("IN_DOCKER") == "true":
|
| 10 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 11 |
+
else:
|
| 12 |
+
demo.launch()
|
src/processing/output_folder.py
CHANGED
|
@@ -14,9 +14,8 @@ def create_output_folder() -> str:
|
|
| 14 |
str: Path to the newly created output folder.
|
| 15 |
"""
|
| 16 |
LOGGER.info("💾 Creating new subfolder...")
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
base_path = one_level_up / "output"
|
| 20 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
| 21 |
work_dir = os.path.join(base_path, timestamp)
|
| 22 |
os.makedirs(work_dir, exist_ok=False)
|
|
|
|
| 14 |
str: Path to the newly created output folder.
|
| 15 |
"""
|
| 16 |
LOGGER.info("💾 Creating new subfolder...")
|
| 17 |
+
base_path = Path.cwd() / "output"
|
| 18 |
+
base_path.mkdir(parents=True, exist_ok=True)
|
|
|
|
| 19 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
| 20 |
work_dir = os.path.join(base_path, timestamp)
|
| 21 |
os.makedirs(work_dir, exist_ok=False)
|
src/services/generator.py
CHANGED
|
@@ -3,7 +3,6 @@
|
|
| 3 |
from pathlib import Path
|
| 4 |
from langfuse.decorators import langfuse_context, observe
|
| 5 |
|
| 6 |
-
# from datetime import datetime
|
| 7 |
from ..database import ingest_files_to_db, retrive_files_from_db
|
| 8 |
from ..telemetry import Logger
|
| 9 |
from ..processing import get_prompt, create_output_folder
|
|
|
|
| 3 |
from pathlib import Path
|
| 4 |
from langfuse.decorators import langfuse_context, observe
|
| 5 |
|
|
|
|
| 6 |
from ..database import ingest_files_to_db, retrive_files_from_db
|
| 7 |
from ..telemetry import Logger
|
| 8 |
from ..processing import get_prompt, create_output_folder
|