Skip to content

Commit bd819ff

Browse files
Merge pull request #102 from hrjn/mistral/add-ocr-notebooks
Add Mistral notebook for OCR+VLM
2 parents b2c76a3 + ebf677d commit bd819ff

File tree

6 files changed

+2794
-0
lines changed

6 files changed

+2794
-0
lines changed

samples/mistral/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Mistral AI models on Azure Foundry
2+
3+
This subdirectory contains code samples to get started with Mistral AI models on
4+
the Azure Foundry platform.
5+
6+
## Getting started
7+
8+
The recommended way to set up your environment is to leverage [uv](). Otherwise you
9+
can rely on the auto-generated `requirements.txt` file with the package manager of
10+
your choice (e.g. pip, poetry, etc.)
11+
12+
To install the required dependencies and start a notebook server, run the following
13+
commands in your terminal:
14+
15+
```bash
16+
uv sync # Installs/updates the required dependencies
17+
uv run jupyter notebook # Starts a notebook server
18+
```
19+
20+
From there you can open the Jupyter notebook UI in your web browser following the URL
21+
that the previous command will output.
22+
23+
You can also run the notebooks from Visual Studio Code, please refer to the
24+
[VSCode documentation](https://code.visualstudio.com/docs/datascience/jupyter-notebooks)
25+
for more details.

samples/mistral/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[project]
2+
name = "mistral-samples-azure-foundry"
3+
version = "0.1.0"
4+
requires-python = ">=3.11"
5+
dependencies = [
6+
"httpx>=0.28.1",
7+
"notebook>=7.4.2",
8+
"pymupdf>=1.25.5",
9+
]

samples/mistral/python/.gitignore

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# .gitignore (Python)
2+
# https://github.com/github/gitignore/blob/main/Python.gitignore
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# UV
101+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
#uv.lock
105+
106+
# poetry
107+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108+
# This is especially recommended for binary packages to ensure reproducibility, and is more
109+
# commonly ignored for libraries.
110+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111+
#poetry.lock
112+
113+
# pdm
114+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115+
#pdm.lock
116+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
117+
# in version control.
118+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
119+
.pdm.toml
120+
.pdm-python
121+
.pdm-build/
122+
123+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
124+
__pypackages__/
125+
126+
# Celery stuff
127+
celerybeat-schedule
128+
celerybeat.pid
129+
130+
# SageMath parsed files
131+
*.sage.py
132+
133+
# Environments
134+
.env
135+
.venv
136+
env/
137+
venv/
138+
ENV/
139+
env.bak/
140+
venv.bak/
141+
142+
# Spyder project settings
143+
.spyderproject
144+
.spyproject
145+
146+
# Rope project settings
147+
.ropeproject
148+
149+
# mkdocs documentation
150+
/site
151+
152+
# mypy
153+
.mypy_cache/
154+
.dmypy.json
155+
dmypy.json
156+
157+
# Pyre type checker
158+
.pyre/
159+
160+
# pytype static type analyzer
161+
.pytype/
162+
163+
# Cython debug symbols
164+
cython_debug/
165+
166+
# PyCharm
167+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
168+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169+
# and can be added to the global gitignore or merged into this file. For a more nuclear
170+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
171+
#.idea/
172+
173+
# Ruff stuff:
174+
.ruff_cache/
175+
176+
# PyPI configuration file
177+
.pypirc

0 commit comments

Comments
 (0)