Man-isH-07 commited on
Commit
449bea4
·
1 Parent(s): e1e79b0
Files changed (10) hide show
  1. .gitignore +162 -0
  2. .pre-commit-config.yaml +33 -0
  3. .python-version +1 -0
  4. LICENSE +21 -0
  5. README.md +8 -5
  6. app.py +119 -0
  7. pyproject.toml +53 -0
  8. requirements.txt +249 -0
  9. style.css +11 -0
  10. uv.lock +0 -0
.gitignore ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ gradio_cached_examples/
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/#use-with-ide
112
+ .pdm.toml
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
.pre-commit-config.yaml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/astral-sh/ruff-pre-commit
17
+ rev: v0.8.6
18
+ hooks:
19
+ - id: ruff
20
+ args: ["--fix"]
21
+ - id: ruff-format
22
+ - repo: https://github.com/pre-commit/mirrors-mypy
23
+ rev: v1.14.1
24
+ hooks:
25
+ - id: mypy
26
+ args: ["--ignore-missing-imports"]
27
+ additional_dependencies:
28
+ [
29
+ "types-python-slugify",
30
+ "types-pytz",
31
+ "types-PyYAML",
32
+ "types-requests",
33
+ ]
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 hysts
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -1,12 +1,15 @@
1
  ---
2
- title: Mistral 7B
3
- emoji: 🦀
4
- colorFrom: gray
5
- colorTo: pink
6
  sdk: gradio
7
- sdk_version: 5.22.0
8
  app_file: app.py
9
  pinned: false
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Mistral-7B
3
+ emoji: 🐨
4
+ colorFrom: pink
5
+ colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 5.12.0
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
11
+ suggested_hardware: t4-small
12
+ short_description: LLM, chatbot
13
  ---
14
 
15
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ import os
4
+ from collections.abc import Iterator
5
+ from threading import Thread
6
+
7
+ import gradio as gr
8
+ import spaces
9
+ import torch
10
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
+
12
+ DESCRIPTION = "# Mistral-7B v0.3"
13
+
14
+ if not torch.cuda.is_available():
15
+ DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
16
+
17
+ MAX_MAX_NEW_TOKENS = 2048
18
+ DEFAULT_MAX_NEW_TOKENS = 1024
19
+ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
20
+
21
+ if torch.cuda.is_available():
22
+ model_id = "mistralai/Mistral-7B-Instruct-v0.3"
23
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
24
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
25
+
26
+
27
+ @spaces.GPU
28
+ def generate(
29
+ message: str,
30
+ chat_history: list[dict],
31
+ max_new_tokens: int = 1024,
32
+ temperature: float = 0.6,
33
+ top_p: float = 0.9,
34
+ top_k: int = 50,
35
+ repetition_penalty: float = 1.2,
36
+ ) -> Iterator[str]:
37
+ conversation = [*chat_history, {"role": "user", "content": message}]
38
+
39
+ input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
40
+ if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
41
+ input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
42
+ gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
43
+ input_ids = input_ids.to(model.device)
44
+
45
+ streamer = TextIteratorStreamer(tokenizer, timeout=20.0, skip_prompt=True, skip_special_tokens=True)
46
+ generate_kwargs = dict(
47
+ {"input_ids": input_ids},
48
+ streamer=streamer,
49
+ max_new_tokens=max_new_tokens,
50
+ do_sample=True,
51
+ top_p=top_p,
52
+ top_k=top_k,
53
+ temperature=temperature,
54
+ num_beams=1,
55
+ repetition_penalty=repetition_penalty,
56
+ )
57
+ t = Thread(target=model.generate, kwargs=generate_kwargs)
58
+ t.start()
59
+
60
+ outputs = []
61
+ for text in streamer:
62
+ outputs.append(text)
63
+ yield "".join(outputs)
64
+
65
+
66
+ demo = gr.ChatInterface(
67
+ fn=generate,
68
+ additional_inputs=[
69
+ gr.Slider(
70
+ label="Max new tokens",
71
+ minimum=1,
72
+ maximum=MAX_MAX_NEW_TOKENS,
73
+ step=1,
74
+ value=DEFAULT_MAX_NEW_TOKENS,
75
+ ),
76
+ gr.Slider(
77
+ label="Temperature",
78
+ minimum=0.1,
79
+ maximum=4.0,
80
+ step=0.1,
81
+ value=0.6,
82
+ ),
83
+ gr.Slider(
84
+ label="Top-p (nucleus sampling)",
85
+ minimum=0.05,
86
+ maximum=1.0,
87
+ step=0.05,
88
+ value=0.9,
89
+ ),
90
+ gr.Slider(
91
+ label="Top-k",
92
+ minimum=1,
93
+ maximum=1000,
94
+ step=1,
95
+ value=50,
96
+ ),
97
+ gr.Slider(
98
+ label="Repetition penalty",
99
+ minimum=1.0,
100
+ maximum=2.0,
101
+ step=0.05,
102
+ value=1.2,
103
+ ),
104
+ ],
105
+ stop_btn=None,
106
+ examples=[
107
+ ["Hello there! How are you doing?"],
108
+ ["Can you explain briefly to me what is the Python programming language?"],
109
+ ["Explain the plot of Cinderella in a sentence."],
110
+ ["How many hours does it take a man to eat a Helicopter?"],
111
+ ["Write a 100-word article on 'Benefits of Open-Source in AI research'"],
112
+ ],
113
+ type="messages",
114
+ description=DESCRIPTION,
115
+ css_paths="style.css",
116
+ )
117
+
118
+ if __name__ == "__main__":
119
+ demo.queue(max_size=20).launch()
pyproject.toml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "mistral-7b"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "accelerate>=1.2.1",
9
+ "bitsandbytes>=0.45.0",
10
+ "gradio>=5.12.0",
11
+ "hf-transfer>=0.1.9",
12
+ "protobuf>=5.29.3",
13
+ "sentencepiece>=0.2.0",
14
+ "spaces>=0.32.0",
15
+ "torch==2.4.0",
16
+ "transformers>=4.48.0",
17
+ ]
18
+
19
+ [tool.ruff]
20
+ line-length = 119
21
+
22
+ [tool.ruff.lint]
23
+ select = ["ALL"]
24
+ ignore = [
25
+ "COM812", # missing-trailing-comma
26
+ "D203", # one-blank-line-before-class
27
+ "D213", # multi-line-summary-second-line
28
+ "E501", # line-too-long
29
+ "SIM117", # multiple-with-statements
30
+ ]
31
+ extend-ignore = [
32
+ "D100", # undocumented-public-module
33
+ "D101", # undocumented-public-class
34
+ "D102", # undocumented-public-method
35
+ "D103", # undocumented-public-function
36
+ "D104", # undocumented-public-package
37
+ "D105", # undocumented-magic-method
38
+ "D107", # undocumented-public-init
39
+ "EM101", # raw-string-in-exception
40
+ "FBT001", # boolean-type-hint-positional-argument
41
+ "FBT002", # boolean-default-value-positional-argument
42
+ "PD901", # pandas-df-variable-name
43
+ "PGH003", # blanket-type-ignore
44
+ "PLR0913", # too-many-arguments
45
+ "PLR0915", # too-many-statements
46
+ "TRY003", # raise-vanilla-args
47
+ ]
48
+ unfixable = [
49
+ "F401", # unused-import
50
+ ]
51
+
52
+ [tool.ruff.format]
53
+ docstring-code-format = true
requirements.txt ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file was autogenerated by uv via the following command:
2
+ # uv pip compile pyproject.toml -o requirements.txt
3
+ accelerate==1.2.1
4
+ # via mistral-7b (pyproject.toml)
5
+ aiofiles==23.2.1
6
+ # via gradio
7
+ annotated-types==0.7.0
8
+ # via pydantic
9
+ anyio==4.8.0
10
+ # via
11
+ # gradio
12
+ # httpx
13
+ # starlette
14
+ bitsandbytes==0.45.0
15
+ # via mistral-7b (pyproject.toml)
16
+ certifi==2024.12.14
17
+ # via
18
+ # httpcore
19
+ # httpx
20
+ # requests
21
+ charset-normalizer==3.4.1
22
+ # via requests
23
+ click==8.1.8
24
+ # via
25
+ # typer
26
+ # uvicorn
27
+ exceptiongroup==1.2.2
28
+ # via anyio
29
+ fastapi==0.115.6
30
+ # via gradio
31
+ ffmpy==0.5.0
32
+ # via gradio
33
+ filelock==3.16.1
34
+ # via
35
+ # huggingface-hub
36
+ # torch
37
+ # transformers
38
+ # triton
39
+ fsspec==2024.12.0
40
+ # via
41
+ # gradio-client
42
+ # huggingface-hub
43
+ # torch
44
+ gradio==5.12.0
45
+ # via
46
+ # mistral-7b (pyproject.toml)
47
+ # spaces
48
+ gradio-client==1.5.4
49
+ # via gradio
50
+ h11==0.14.0
51
+ # via
52
+ # httpcore
53
+ # uvicorn
54
+ hf-transfer==0.1.9
55
+ # via mistral-7b (pyproject.toml)
56
+ httpcore==1.0.7
57
+ # via httpx
58
+ httpx==0.28.1
59
+ # via
60
+ # gradio
61
+ # gradio-client
62
+ # safehttpx
63
+ # spaces
64
+ huggingface-hub==0.27.1
65
+ # via
66
+ # accelerate
67
+ # gradio
68
+ # gradio-client
69
+ # tokenizers
70
+ # transformers
71
+ idna==3.10
72
+ # via
73
+ # anyio
74
+ # httpx
75
+ # requests
76
+ jinja2==3.1.5
77
+ # via
78
+ # gradio
79
+ # torch
80
+ markdown-it-py==3.0.0
81
+ # via rich
82
+ markupsafe==2.1.5
83
+ # via
84
+ # gradio
85
+ # jinja2
86
+ mdurl==0.1.2
87
+ # via markdown-it-py
88
+ mpmath==1.3.0
89
+ # via sympy
90
+ networkx==3.4.2
91
+ # via torch
92
+ numpy==2.2.1
93
+ # via
94
+ # accelerate
95
+ # bitsandbytes
96
+ # gradio
97
+ # pandas
98
+ # transformers
99
+ nvidia-cublas-cu12==12.1.3.1
100
+ # via
101
+ # nvidia-cudnn-cu12
102
+ # nvidia-cusolver-cu12
103
+ # torch
104
+ nvidia-cuda-cupti-cu12==12.1.105
105
+ # via torch
106
+ nvidia-cuda-nvrtc-cu12==12.1.105
107
+ # via torch
108
+ nvidia-cuda-runtime-cu12==12.1.105
109
+ # via torch
110
+ nvidia-cudnn-cu12==9.1.0.70
111
+ # via torch
112
+ nvidia-cufft-cu12==11.0.2.54
113
+ # via torch
114
+ nvidia-curand-cu12==10.3.2.106
115
+ # via torch
116
+ nvidia-cusolver-cu12==11.4.5.107
117
+ # via torch
118
+ nvidia-cusparse-cu12==12.1.0.106
119
+ # via
120
+ # nvidia-cusolver-cu12
121
+ # torch
122
+ nvidia-nccl-cu12==2.20.5
123
+ # via torch
124
+ nvidia-nvjitlink-cu12==12.6.85
125
+ # via
126
+ # nvidia-cusolver-cu12
127
+ # nvidia-cusparse-cu12
128
+ nvidia-nvtx-cu12==12.1.105
129
+ # via torch
130
+ orjson==3.10.14
131
+ # via gradio
132
+ packaging==24.2
133
+ # via
134
+ # accelerate
135
+ # gradio
136
+ # gradio-client
137
+ # huggingface-hub
138
+ # spaces
139
+ # transformers
140
+ pandas==2.2.3
141
+ # via gradio
142
+ pillow==11.1.0
143
+ # via gradio
144
+ protobuf==5.29.3
145
+ # via mistral-7b (pyproject.toml)
146
+ psutil==5.9.8
147
+ # via
148
+ # accelerate
149
+ # spaces
150
+ pydantic==2.10.5
151
+ # via
152
+ # fastapi
153
+ # gradio
154
+ # spaces
155
+ pydantic-core==2.27.2
156
+ # via pydantic
157
+ pydub==0.25.1
158
+ # via gradio
159
+ pygments==2.19.1
160
+ # via rich
161
+ python-dateutil==2.9.0.post0
162
+ # via pandas
163
+ python-multipart==0.0.20
164
+ # via gradio
165
+ pytz==2024.2
166
+ # via pandas
167
+ pyyaml==6.0.2
168
+ # via
169
+ # accelerate
170
+ # gradio
171
+ # huggingface-hub
172
+ # transformers
173
+ regex==2024.11.6
174
+ # via transformers
175
+ requests==2.32.3
176
+ # via
177
+ # huggingface-hub
178
+ # spaces
179
+ # transformers
180
+ rich==13.9.4
181
+ # via typer
182
+ ruff==0.9.1
183
+ # via gradio
184
+ safehttpx==0.1.6
185
+ # via gradio
186
+ safetensors==0.5.2
187
+ # via
188
+ # accelerate
189
+ # transformers
190
+ semantic-version==2.10.0
191
+ # via gradio
192
+ sentencepiece==0.2.0
193
+ # via mistral-7b (pyproject.toml)
194
+ shellingham==1.5.4
195
+ # via typer
196
+ six==1.17.0
197
+ # via python-dateutil
198
+ sniffio==1.3.1
199
+ # via anyio
200
+ spaces==0.32.0
201
+ # via mistral-7b (pyproject.toml)
202
+ starlette==0.41.3
203
+ # via
204
+ # fastapi
205
+ # gradio
206
+ sympy==1.13.3
207
+ # via torch
208
+ tokenizers==0.21.0
209
+ # via transformers
210
+ tomlkit==0.13.2
211
+ # via gradio
212
+ torch==2.4.0
213
+ # via
214
+ # mistral-7b (pyproject.toml)
215
+ # accelerate
216
+ # bitsandbytes
217
+ tqdm==4.67.1
218
+ # via
219
+ # huggingface-hub
220
+ # transformers
221
+ transformers==4.48.0
222
+ # via mistral-7b (pyproject.toml)
223
+ triton==3.0.0
224
+ # via torch
225
+ typer==0.15.1
226
+ # via gradio
227
+ typing-extensions==4.12.2
228
+ # via
229
+ # anyio
230
+ # bitsandbytes
231
+ # fastapi
232
+ # gradio
233
+ # gradio-client
234
+ # huggingface-hub
235
+ # pydantic
236
+ # pydantic-core
237
+ # rich
238
+ # spaces
239
+ # torch
240
+ # typer
241
+ # uvicorn
242
+ tzdata==2024.2
243
+ # via pandas
244
+ urllib3==2.3.0
245
+ # via requests
246
+ uvicorn==0.34.0
247
+ # via gradio
248
+ websockets==14.1
249
+ # via gradio-client
style.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h1 {
2
+ text-align: center;
3
+ display: block;
4
+ }
5
+
6
+ #duplicate-button {
7
+ margin: auto;
8
+ color: white;
9
+ background: #1565c0;
10
+ border-radius: 100vh;
11
+ }
uv.lock ADDED
The diff for this file is too large to render. See raw diff