Spaces:
Sleeping
Sleeping
Update project dependencies and configuration
Browse files- Updated Gradio version to 5.46.1 with Hugging Face Hub dependency
- Enhanced .gitignore with comprehensive Python project patterns
- Added local development instructions to README
- Changed server port to 7860 for local deployment
- Added pyproject.toml and uv.lock for modern Python packaging
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- .gitignore +169 -6
- README.md +18 -2
- app.py +1 -1
- pyproject.toml +36 -0
- requirements.txt +2 -1
- uv.lock +0 -0
.gitignore
CHANGED
|
@@ -1,12 +1,175 @@
|
|
| 1 |
-
#
|
| 2 |
__pycache__/
|
| 3 |
-
*.py[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
build/
|
|
|
|
| 5 |
dist/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
wheels/
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
.cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Byte-compiled / optimized / DLL files
|
| 2 |
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
*$py.class
|
| 5 |
+
|
| 6 |
+
# C extensions
|
| 7 |
+
*.so
|
| 8 |
+
|
| 9 |
+
# Distribution / packaging
|
| 10 |
+
.Python
|
| 11 |
build/
|
| 12 |
+
develop-eggs/
|
| 13 |
dist/
|
| 14 |
+
downloads/
|
| 15 |
+
eggs/
|
| 16 |
+
.eggs/
|
| 17 |
+
lib/
|
| 18 |
+
lib64/
|
| 19 |
+
parts/
|
| 20 |
+
sdist/
|
| 21 |
+
var/
|
| 22 |
wheels/
|
| 23 |
+
share/python-wheels/
|
| 24 |
+
*.egg-info/
|
| 25 |
+
.installed.cfg
|
| 26 |
+
*.egg
|
| 27 |
+
MANIFEST
|
| 28 |
|
| 29 |
+
# PyInstaller
|
| 30 |
+
# Usually these files are written by a python script from a template
|
| 31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
| 32 |
+
*.manifest
|
| 33 |
+
*.spec
|
| 34 |
+
|
| 35 |
+
# Installer logs
|
| 36 |
+
pip-log.txt
|
| 37 |
+
pip-delete-this-directory.txt
|
| 38 |
+
|
| 39 |
+
# Unit test / coverage reports
|
| 40 |
+
htmlcov/
|
| 41 |
+
.tox/
|
| 42 |
+
.nox/
|
| 43 |
+
.coverage
|
| 44 |
+
.coverage.*
|
| 45 |
.cache
|
| 46 |
+
nosetests.xml
|
| 47 |
+
coverage.xml
|
| 48 |
+
*.cover
|
| 49 |
+
*.py,cover
|
| 50 |
+
.hypothesis/
|
| 51 |
+
.pytest_cache/
|
| 52 |
+
cover/
|
| 53 |
+
|
| 54 |
+
# Translations
|
| 55 |
+
*.mo
|
| 56 |
+
*.pot
|
| 57 |
+
|
| 58 |
+
# Django stuff:
|
| 59 |
+
*.log
|
| 60 |
+
local_settings.py
|
| 61 |
+
db.sqlite3
|
| 62 |
+
db.sqlite3-journal
|
| 63 |
+
|
| 64 |
+
# Flask stuff:
|
| 65 |
+
instance/
|
| 66 |
+
.webassets-cache
|
| 67 |
+
|
| 68 |
+
# Scrapy stuff:
|
| 69 |
+
.scrapy
|
| 70 |
+
|
| 71 |
+
# Sphinx documentation
|
| 72 |
+
docs/_build/
|
| 73 |
+
|
| 74 |
+
# PyBuilder
|
| 75 |
+
.pybuilder/
|
| 76 |
+
target/
|
| 77 |
+
|
| 78 |
+
# Jupyter Notebook
|
| 79 |
+
.ipynb_checkpoints
|
| 80 |
+
|
| 81 |
+
# IPython
|
| 82 |
+
profile_default/
|
| 83 |
+
ipython_config.py
|
| 84 |
+
|
| 85 |
+
# pyenv
|
| 86 |
+
# For a library or package, you might want to ignore these files since the code is
|
| 87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
| 88 |
+
# .python-version
|
| 89 |
+
|
| 90 |
+
# pipenv
|
| 91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
| 92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
| 93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
| 94 |
+
# install all needed dependencies.
|
| 95 |
+
#Pipfile.lock
|
| 96 |
+
|
| 97 |
+
# poetry
|
| 98 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
| 99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
| 100 |
+
# commonly ignored for libraries.
|
| 101 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
| 102 |
+
#poetry.lock
|
| 103 |
+
|
| 104 |
+
# pdm
|
| 105 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
| 106 |
+
#pdm.lock
|
| 107 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
| 108 |
+
# in version control.
|
| 109 |
+
# https://pdm.fming.dev/#use-with-ide
|
| 110 |
+
.pdm.toml
|
| 111 |
+
|
| 112 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
| 113 |
+
__pypackages__/
|
| 114 |
+
|
| 115 |
+
# Celery stuff
|
| 116 |
+
celerybeat-schedule
|
| 117 |
+
celerybeat.pid
|
| 118 |
+
|
| 119 |
+
# SageMath parsed files
|
| 120 |
+
*.sage.py
|
| 121 |
+
|
| 122 |
+
# Environments
|
| 123 |
+
.env
|
| 124 |
+
.venv
|
| 125 |
+
env/
|
| 126 |
+
venv/
|
| 127 |
+
ENV/
|
| 128 |
+
env.bak/
|
| 129 |
+
venv.bak/
|
| 130 |
+
|
| 131 |
+
# Spyder project settings
|
| 132 |
+
.spyderproject
|
| 133 |
+
.spyproject
|
| 134 |
+
|
| 135 |
+
# Rope project settings
|
| 136 |
+
.ropeproject
|
| 137 |
+
|
| 138 |
+
# mkdocs documentation
|
| 139 |
+
/site
|
| 140 |
+
|
| 141 |
+
# mypy
|
| 142 |
+
.mypy_cache/
|
| 143 |
+
.dmypy.json
|
| 144 |
+
dmypy.json
|
| 145 |
+
|
| 146 |
+
# Pyre type checker
|
| 147 |
+
.pyre/
|
| 148 |
+
|
| 149 |
+
# pytype static type analyzer
|
| 150 |
+
.pytype/
|
| 151 |
+
|
| 152 |
+
# Cython debug symbols
|
| 153 |
+
cython_debug/
|
| 154 |
+
|
| 155 |
+
# PyCharm
|
| 156 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
| 157 |
+
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
|
| 158 |
+
# project, it is recommended to include the following files in version control:
|
| 159 |
+
# - .idea/modules.xml
|
| 160 |
+
# - .idea/*.iml
|
| 161 |
+
# - .idea/misc.xml
|
| 162 |
+
# - .idea/vcs.xml
|
| 163 |
+
.idea/
|
| 164 |
+
|
| 165 |
+
# VS Code
|
| 166 |
+
.vscode/
|
| 167 |
+
|
| 168 |
+
# Temporary files
|
| 169 |
+
*.tmp
|
| 170 |
+
*.temp
|
| 171 |
+
temp_maze_*.pdf
|
| 172 |
+
download_response.html
|
| 173 |
+
|
| 174 |
+
# PDF directory (will be created on the fly)
|
| 175 |
+
pdfs/
|
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🎯
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
|
@@ -47,4 +47,20 @@ A Gradio web interface that generates custom maze PDFs from https://www.mazegene
|
|
| 47 |
- `gradio`: Web interface framework
|
| 48 |
- `pandas`: Data manipulation
|
| 49 |
- `pypdf`: PDF processing and merging
|
| 50 |
-
- `requests`: HTTP requests to maze generator API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.46.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
|
|
|
| 47 |
- `gradio`: Web interface framework
|
| 48 |
- `pandas`: Data manipulation
|
| 49 |
- `pypdf`: PDF processing and merging
|
| 50 |
+
- `requests`: HTTP requests to maze generator API
|
| 51 |
+
|
| 52 |
+
## Deployment
|
| 53 |
+
|
| 54 |
+
This app is designed to be deployed on Hugging Face Spaces. The deployment configuration is specified in the front matter of this README.md file.
|
| 55 |
+
|
| 56 |
+
## Local Development
|
| 57 |
+
|
| 58 |
+
To run this app locally:
|
| 59 |
+
|
| 60 |
+
1. Clone the repository
|
| 61 |
+
2. Create a virtual environment: `python -m venv venv`
|
| 62 |
+
3. Activate the environment: `source venv/bin/activate` (Linux/Mac) or `venv\Scripts\activate` (Windows)
|
| 63 |
+
4. Install dependencies: `pip install -e .`
|
| 64 |
+
5. Run the app: `python app.py`
|
| 65 |
+
|
| 66 |
+
The app will be available at `http://localhost:7861`
|
app.py
CHANGED
|
@@ -181,7 +181,7 @@ if __name__ == "__main__":
|
|
| 181 |
interface = create_interface()
|
| 182 |
interface.launch(
|
| 183 |
server_name="0.0.0.0",
|
| 184 |
-
server_port=
|
| 185 |
share=False,
|
| 186 |
show_error=True
|
| 187 |
)
|
|
|
|
| 181 |
interface = create_interface()
|
| 182 |
interface.launch(
|
| 183 |
server_name="0.0.0.0",
|
| 184 |
+
server_port=7860,
|
| 185 |
share=False,
|
| 186 |
show_error=True
|
| 187 |
)
|
pyproject.toml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[project]
|
| 2 |
+
name = "maze-generator"
|
| 3 |
+
version = "0.1.0"
|
| 4 |
+
description = "A Gradio web interface that generates custom maze PDFs"
|
| 5 |
+
readme = "README.md"
|
| 6 |
+
requires-python = ">=3.12"
|
| 7 |
+
license = {text = "MIT"}
|
| 8 |
+
authors = [
|
| 9 |
+
{name = "Maze Generator"}
|
| 10 |
+
]
|
| 11 |
+
keywords = ["maze", "generator", "gradio", "pdf"]
|
| 12 |
+
classifiers = [
|
| 13 |
+
"Development Status :: 4 - Beta",
|
| 14 |
+
"Intended Audience :: Developers",
|
| 15 |
+
"License :: OSI Approved :: MIT License",
|
| 16 |
+
"Operating System :: OS Independent",
|
| 17 |
+
"Programming Language :: Python :: 3",
|
| 18 |
+
"Programming Language :: Python :: 3.12",
|
| 19 |
+
"Topic :: Multimedia :: Graphics",
|
| 20 |
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
| 21 |
+
]
|
| 22 |
+
dependencies = [
|
| 23 |
+
"gradio==5.46.1",
|
| 24 |
+
"huggingface-hub==0.34.4",
|
| 25 |
+
"pandas==2.2.2",
|
| 26 |
+
"pypdf==3.17.4",
|
| 27 |
+
"requests==2.32.3",
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
[build-system]
|
| 31 |
+
requires = ["hatchling"]
|
| 32 |
+
build-backend = "hatchling.build"
|
| 33 |
+
|
| 34 |
+
[project.urls]
|
| 35 |
+
Repository = "https://huggingface.co/spaces/your-username/maze-generator"
|
| 36 |
+
"Bug Tracker" = "https://huggingface.co/spaces/your-username/maze-generator/discussions"
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
gradio==
|
|
|
|
| 2 |
pandas==2.2.2
|
| 3 |
pypdf==3.17.4
|
| 4 |
requests==2.32.3
|
|
|
|
| 1 |
+
gradio==5.46.1
|
| 2 |
+
huggingface-hub==0.34.4
|
| 3 |
pandas==2.2.2
|
| 4 |
pypdf==3.17.4
|
| 5 |
requests==2.32.3
|
uv.lock
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|