Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update
Browse files- .pre-commit-config.yaml +56 -0
- .python-version +1 -0
- .vscode/extensions.json +8 -0
- .vscode/settings.json +21 -0
- pyproject.toml +50 -0
- uv.lock +0 -0
    	
        .pre-commit-config.yaml
    ADDED
    
    | @@ -0,0 +1,56 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            repos:
         | 
| 2 | 
            +
              - repo: https://github.com/pre-commit/pre-commit-hooks
         | 
| 3 | 
            +
                rev: v5.0.0
         | 
| 4 | 
            +
                hooks:
         | 
| 5 | 
            +
                  - id: check-executables-have-shebangs
         | 
| 6 | 
            +
                  - id: check-json
         | 
| 7 | 
            +
                  - id: check-merge-conflict
         | 
| 8 | 
            +
                  - id: check-shebang-scripts-are-executable
         | 
| 9 | 
            +
                  - id: check-toml
         | 
| 10 | 
            +
                  - id: check-yaml
         | 
| 11 | 
            +
                  - id: end-of-file-fixer
         | 
| 12 | 
            +
                  - id: mixed-line-ending
         | 
| 13 | 
            +
                    args: ["--fix=lf"]
         | 
| 14 | 
            +
                  - id: requirements-txt-fixer
         | 
| 15 | 
            +
                  - id: trailing-whitespace
         | 
| 16 | 
            +
              - repo: https://github.com/myint/docformatter
         | 
| 17 | 
            +
                rev: v1.7.5
         | 
| 18 | 
            +
                hooks:
         | 
| 19 | 
            +
                  - id: docformatter
         | 
| 20 | 
            +
                    args: ["--in-place"]
         | 
| 21 | 
            +
              - repo: https://github.com/astral-sh/ruff-pre-commit
         | 
| 22 | 
            +
                rev: v0.8.4
         | 
| 23 | 
            +
                hooks:
         | 
| 24 | 
            +
                  - id: ruff
         | 
| 25 | 
            +
                    args: ["--fix"]
         | 
| 26 | 
            +
                  - id: ruff-format
         | 
| 27 | 
            +
                    args: ["--line-length", "119"]
         | 
| 28 | 
            +
              - repo: https://github.com/pre-commit/mirrors-mypy
         | 
| 29 | 
            +
                rev: v1.14.0
         | 
| 30 | 
            +
                hooks:
         | 
| 31 | 
            +
                  - id: mypy
         | 
| 32 | 
            +
                    args: ["--ignore-missing-imports"]
         | 
| 33 | 
            +
                    additional_dependencies:
         | 
| 34 | 
            +
                      [
         | 
| 35 | 
            +
                        "types-python-slugify",
         | 
| 36 | 
            +
                        "types-requests",
         | 
| 37 | 
            +
                        "types-PyYAML",
         | 
| 38 | 
            +
                        "types-pytz",
         | 
| 39 | 
            +
                      ]
         | 
| 40 | 
            +
              - repo: https://github.com/kynan/nbstripout
         | 
| 41 | 
            +
                rev: 0.8.1
         | 
| 42 | 
            +
                hooks:
         | 
| 43 | 
            +
                  - id: nbstripout
         | 
| 44 | 
            +
                    args:
         | 
| 45 | 
            +
                      [
         | 
| 46 | 
            +
                        "--extra-keys",
         | 
| 47 | 
            +
                        "metadata.interpreter metadata.kernelspec cell.metadata.pycharm",
         | 
| 48 | 
            +
                      ]
         | 
| 49 | 
            +
              - repo: https://github.com/nbQA-dev/nbQA
         | 
| 50 | 
            +
                rev: 1.9.1
         | 
| 51 | 
            +
                hooks:
         | 
| 52 | 
            +
                  - id: nbqa-black
         | 
| 53 | 
            +
                  - id: nbqa-pyupgrade
         | 
| 54 | 
            +
                    args: ["--py37-plus"]
         | 
| 55 | 
            +
                  - id: nbqa-isort
         | 
| 56 | 
            +
                    args: ["--float-to-top"]
         | 
    	
        .python-version
    ADDED
    
    | @@ -0,0 +1 @@ | |
|  | 
|  | |
| 1 | 
            +
            3.10
         | 
    	
        .vscode/extensions.json
    ADDED
    
    | @@ -0,0 +1,8 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
                "recommendations": [
         | 
| 3 | 
            +
                    "ms-python.python",
         | 
| 4 | 
            +
                    "charliermarsh.ruff",
         | 
| 5 | 
            +
                    "streetsidesoftware.code-spell-checker",
         | 
| 6 | 
            +
                    "tamasfe.even-better-toml"
         | 
| 7 | 
            +
                ]
         | 
| 8 | 
            +
            }
         | 
    	
        .vscode/settings.json
    ADDED
    
    | @@ -0,0 +1,21 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
                "editor.formatOnSave": true,
         | 
| 3 | 
            +
                "files.insertFinalNewline": false,
         | 
| 4 | 
            +
                "[python]": {
         | 
| 5 | 
            +
                    "editor.defaultFormatter": "charliermarsh.ruff",
         | 
| 6 | 
            +
                    "editor.formatOnType": true,
         | 
| 7 | 
            +
                    "editor.codeActionsOnSave": {
         | 
| 8 | 
            +
                        "source.fixAll.ruff": "explicit",
         | 
| 9 | 
            +
                        "source.organizeImports": "explicit"
         | 
| 10 | 
            +
                    }
         | 
| 11 | 
            +
                },
         | 
| 12 | 
            +
                "[jupyter]": {
         | 
| 13 | 
            +
                    "files.insertFinalNewline": false
         | 
| 14 | 
            +
                },
         | 
| 15 | 
            +
                "notebook.output.scrolling": true,
         | 
| 16 | 
            +
                "notebook.formatOnCellExecution": true,
         | 
| 17 | 
            +
                "notebook.formatOnSave.enabled": true,
         | 
| 18 | 
            +
                "notebook.codeActionsOnSave": {
         | 
| 19 | 
            +
                    "source.organizeImports": "explicit"
         | 
| 20 | 
            +
                }
         | 
| 21 | 
            +
            }
         | 
    	
        pyproject.toml
    ADDED
    
    | @@ -0,0 +1,50 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            [project]
         | 
| 2 | 
            +
            name = "gemma-2-2b-it"
         | 
| 3 | 
            +
            version = "0.1.0"
         | 
| 4 | 
            +
            description = ""
         | 
| 5 | 
            +
            readme = "README.md"
         | 
| 6 | 
            +
            requires-python = ">=3.10"
         | 
| 7 | 
            +
            dependencies = [
         | 
| 8 | 
            +
                "accelerate>=1.2.1",
         | 
| 9 | 
            +
                "gradio>=5.9.1",
         | 
| 10 | 
            +
                "hf-transfer>=0.1.8",
         | 
| 11 | 
            +
                "spaces>=0.31.1",
         | 
| 12 | 
            +
                "torch==2.4.0",
         | 
| 13 | 
            +
                "transformers>=4.47.1",
         | 
| 14 | 
            +
            ]
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            [tool.ruff]
         | 
| 17 | 
            +
            line-length = 119
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            [tool.ruff.lint]
         | 
| 20 | 
            +
            select = ["ALL"]
         | 
| 21 | 
            +
            ignore = [
         | 
| 22 | 
            +
                "COM812", # missing-trailing-comma
         | 
| 23 | 
            +
                "D203",   # one-blank-line-before-class
         | 
| 24 | 
            +
                "D213",   # multi-line-summary-second-line
         | 
| 25 | 
            +
                "E501",   # line-too-long
         | 
| 26 | 
            +
                "SIM117", # multiple-with-statements
         | 
| 27 | 
            +
            ]
         | 
| 28 | 
            +
            extend-ignore = [
         | 
| 29 | 
            +
                "D100",    # undocumented-public-module
         | 
| 30 | 
            +
                "D101",    # undocumented-public-class
         | 
| 31 | 
            +
                "D102",    # undocumented-public-method
         | 
| 32 | 
            +
                "D103",    # undocumented-public-function
         | 
| 33 | 
            +
                "D104",    # undocumented-public-package
         | 
| 34 | 
            +
                "D105",    # undocumented-magic-method
         | 
| 35 | 
            +
                "D107",    # undocumented-public-init
         | 
| 36 | 
            +
                "EM101",   # raw-string-in-exception
         | 
| 37 | 
            +
                "FBT001",  # boolean-type-hint-positional-argument
         | 
| 38 | 
            +
                "FBT002",  # boolean-default-value-positional-argument
         | 
| 39 | 
            +
                "PD901",   # pandas-df-variable-name
         | 
| 40 | 
            +
                "PGH003",  # blanket-type-ignore
         | 
| 41 | 
            +
                "PLR0913", # too-many-arguments
         | 
| 42 | 
            +
                "PLR0915", # too-many-statements
         | 
| 43 | 
            +
                "TRY003",  # raise-vanilla-args
         | 
| 44 | 
            +
            ]
         | 
| 45 | 
            +
            unfixable = [
         | 
| 46 | 
            +
                "F401", # unused-import
         | 
| 47 | 
            +
            ]
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            [tool.ruff.format]
         | 
| 50 | 
            +
            docstring-code-format = true
         | 
    	
        uv.lock
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
 
			
