sinapsis-huggingface 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sinapsis_huggingface-0.2.1/PKG-INFO +297 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/README.md +50 -12
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface.egg-info/PKG-INFO +297 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface.egg-info/SOURCES.txt +6 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface.egg-info/requires.txt +1 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/base_diffusers.py +2 -2
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/image_to_image_diffusers.py +1 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/image_to_video_gen_xl_diffusers.py +1 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/inpainting_diffusers.py +1 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_embeddings/src/sinapsis_huggingface_embeddings/templates/hugging_face_embedding_extractor.py +2 -2
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_embeddings/src/sinapsis_huggingface_embeddings/templates/speaker_embedding_from_audio.py +2 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_embeddings/src/sinapsis_huggingface_embeddings/templates/speaker_embedding_from_dataset.py +2 -4
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/templates/grounding_dino.py +2 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/templates/grounding_dino_classification.py +0 -7
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/__init__.py +3 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/base_transformers.py +13 -2
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/image_to_text_transformers.py +2 -1
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/pali_gemma/pali_gemma_base.py +97 -0
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/pali_gemma/pali_gemma_detection.py +124 -0
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/pali_gemma/pali_gemma_inference.py +260 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/speech_to_text_transformers.py +2 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/summarization_transformers.py +2 -1
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/text_to_speech_transformers.py +3 -2
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/templates/translation_transformers.py +2 -1
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/thirdparty/__init__.py +0 -0
- sinapsis_huggingface-0.2.1/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/thirdparty/helpers.py +70 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/pyproject.toml +3 -3
- sinapsis_huggingface-0.1.0/PKG-INFO +0 -921
- sinapsis_huggingface-0.1.0/packages/sinapsis_huggingface.egg-info/PKG-INFO +0 -921
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/LICENSE +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface.egg-info/dependency_links.txt +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface.egg-info/top_level.txt +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_diffusers/src/sinapsis_huggingface_diffusers/templates/text_to_image_diffusers.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_embeddings/src/sinapsis_huggingface_embeddings/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_embeddings/src/sinapsis_huggingface_embeddings/templates/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/helpers/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/helpers/grounding_dino_keys.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_grounding_dino/src/sinapsis_huggingface_grounding_dino/templates/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/helpers/__init__.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/packages/sinapsis_huggingface_transformers/src/sinapsis_huggingface_transformers/helpers/text_to_sentences.py +0 -0
- {sinapsis_huggingface-0.1.0 → sinapsis_huggingface-0.2.1}/setup.cfg +0 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sinapsis-huggingface
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Package for HuggingFace-based templates
|
|
5
|
+
Author-email: SinapsisAI <dev@sinapsis.tech>
|
|
6
|
+
Project-URL: Homepage, https://sinapsis.tech
|
|
7
|
+
Project-URL: Documentation, https://docs.sinapsis.tech/docs
|
|
8
|
+
Project-URL: Tutorials, https://docs.sinapsis.tech/tutorials
|
|
9
|
+
Project-URL: Repository, https://github.com/Sinapsis-AI/sinapsis-huggingface.git
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: sinapsis>=0.1.1
|
|
14
|
+
Provides-Extra: gradio-app
|
|
15
|
+
Requires-Dist: sinapsis-data-readers[opencv]>=0.1.0; extra == "gradio-app"
|
|
16
|
+
Requires-Dist: sinapsis-data-visualization[visualization-matplotlib]>=0.1.0; extra == "gradio-app"
|
|
17
|
+
Requires-Dist: sinapsis-huggingface-diffusers[all]; extra == "gradio-app"
|
|
18
|
+
Requires-Dist: sinapsis-huggingface-grounding-dino; extra == "gradio-app"
|
|
19
|
+
Requires-Dist: sinapsis-ultralytics>=0.1.0; extra == "gradio-app"
|
|
20
|
+
Requires-Dist: sinapsis[webapp]>=0.2.7; extra == "gradio-app"
|
|
21
|
+
Provides-Extra: all
|
|
22
|
+
Requires-Dist: sinapsis-huggingface-diffusers[all]; extra == "all"
|
|
23
|
+
Requires-Dist: sinapsis-huggingface-embeddings; extra == "all"
|
|
24
|
+
Requires-Dist: sinapsis-huggingface-grounding-dino; extra == "all"
|
|
25
|
+
Requires-Dist: sinapsis-huggingface-transformers; extra == "all"
|
|
26
|
+
Requires-Dist: sinapsis-huggingface[gradio-app,sinapsis-data-writers]; extra == "all"
|
|
27
|
+
Provides-Extra: sinapsis-data-writers
|
|
28
|
+
Requires-Dist: sinapsis-data-writers>=0.1.0; extra == "sinapsis-data-writers"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
<h1 align="center">
|
|
32
|
+
<br>
|
|
33
|
+
<br>
|
|
34
|
+
<a href="https://sinapsis.tech/">
|
|
35
|
+
<img
|
|
36
|
+
src="https://github.com/Sinapsis-AI/brand-resources/blob/main/sinapsis_logo/4x/logo.png?raw=true"
|
|
37
|
+
alt="" width="300">
|
|
38
|
+
</a>
|
|
39
|
+
<br>
|
|
40
|
+
Sinapsis Hugging Face
|
|
41
|
+
<br>
|
|
42
|
+
</h1>
|
|
43
|
+
|
|
44
|
+
<h4 align="center">Package providing seamless integration with Hugging Face models, specializing in zero-shot object detection, classification, segmentation, generative workflows, and embeddings. It leverages state-of-the-art tools like Grounding DINO, Hugging Face Diffusers, and Transformers, enabling efficient implementation and customization.</h4>
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<a href="#installation">🐍 Installation</a> •
|
|
48
|
+
<a href="#packages">📦 Packages</a> •
|
|
49
|
+
<a href="#webapps">🌐 Webapps</a> •
|
|
50
|
+
<a href="#webapps">📙 Documentation</a> •
|
|
51
|
+
<a href="#packages">🔍 License</a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<h2 id="installation">🐍 Installation</h2>
|
|
56
|
+
|
|
57
|
+
This repo consists of different packages to handle huggingface tools for different tasks:
|
|
58
|
+
|
|
59
|
+
* <code>sinapsis-huggingface-diffusers</code>
|
|
60
|
+
* <code>sinapsis-huggingface-embeddings</code>
|
|
61
|
+
* <code>sinapsis-huggingface-grounding-dino</code>
|
|
62
|
+
* <code>sinapsis-huggingface-transformers</code>
|
|
63
|
+
|
|
64
|
+
Install using your package manager of choice. We encourage the use of <code>uv</code>
|
|
65
|
+
|
|
66
|
+
Example with <code>uv</code>:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
uv pip install sinapsis-huggingface-diffusers --extra-index-url https://pypi.sinapsis.tech
|
|
70
|
+
```
|
|
71
|
+
or with raw <code>pip</code>:
|
|
72
|
+
```bash
|
|
73
|
+
pip install sinapsis-huggingface-diffusers --extra-index-url https://pypi.sinapsis.tech
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Change the name of the package for the one you want to install.
|
|
78
|
+
|
|
79
|
+
> [!IMPORTANT]
|
|
80
|
+
> Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:
|
|
81
|
+
>
|
|
82
|
+
with <code>uv</code>:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
uv pip install sinapsis-huggingface-diffusers[all] --extra-index-url https://pypi.sinapsis.tech
|
|
86
|
+
```
|
|
87
|
+
or with raw <code>pip</code>:
|
|
88
|
+
```bash
|
|
89
|
+
pip install sinapsis-huggingface-diffusers[all] --extra-index-url https://pypi.sinapsis.tech
|
|
90
|
+
```
|
|
91
|
+
Change the name of the package accordingly
|
|
92
|
+
|
|
93
|
+
> [!TIP]
|
|
94
|
+
> You can also install all the packages within this project:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
uv pip install sinapsis-huggingface[all] --extra-index-url https://pypi.sinapsis.tech
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
<h2 id="packages">📦 Packages</h2>
|
|
101
|
+
|
|
102
|
+
This repository is structured into modular packages, each designed for specific Hugging Face model integrations. These packages provide ready-to-use templates for tasks like text generation, embeddings, object detection, and diffusion-based image processing.
|
|
103
|
+
|
|
104
|
+
Each package can be used independently or combined to create more complex workflows. Below is an overview of the available packages:
|
|
105
|
+
<details>
|
|
106
|
+
<summary id="uv"><strong><span style="font-size: 1.4em;">Sinapsis Hugging Face Diffusers</span></strong></summary>
|
|
107
|
+
|
|
108
|
+
This sinapsis package provides a powerful and flexible implementation of Hugging Face's diffusers library. It includes:
|
|
109
|
+
|
|
110
|
+
- Templates for tasks like **text-to-image**, **image-to-image**, **inpainting**, and **image-to-video generation**.
|
|
111
|
+
- Support for state-of-the-art models like **Stable Diffusion** and other diffusion-based architectures.
|
|
112
|
+
- Robust pipelines for generating and transforming visual content.
|
|
113
|
+
|
|
114
|
+
For specific instructions and further details, see the [README.md](https://github.com/Sinapsis-AI/sinapsis-huggingface/blob/main/packages/sinapsis_huggingface_diffusers/README.md).
|
|
115
|
+
</details>
|
|
116
|
+
<details>
|
|
117
|
+
<summary id="uv"><strong><span style="font-size: 1.4em;">Sinapsis Hugging Face Embeddings</span></strong></summary>
|
|
118
|
+
|
|
119
|
+
This package provides templates for generating and managing embeddings using Hugging Face models:
|
|
120
|
+
|
|
121
|
+
- **Speaker Embeddings**: Extract embeddings from audio packets or pre-defined Hugging Face datasets and attach them to audio or text packets.
|
|
122
|
+
- **Text Embeddings**: Generate embeddings for documents, with support for customizable chunking and metadata handling.
|
|
123
|
+
|
|
124
|
+
For more details, see the [README.md](https://github.com/Sinapsis-AI/sinapsis-huggingface/blob/main/packages/sinapsis_huggingface_embeddings/README.md).
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
<details>
|
|
128
|
+
<summary id="uv"><strong><span style="font-size: 1.4em;">Sinapsis Hugging Face Grounding DINO</span></strong></summary>
|
|
129
|
+
|
|
130
|
+
This sinapsis package provides **zero-shot detection and classification** capabilities using Hugging Face's Grounding DINO. It includes:
|
|
131
|
+
|
|
132
|
+
- Ready-to-use inference templates for object detection tasks and classification pipelines.
|
|
133
|
+
- Template for fine-tuning Grounding DINO checkpoints on specific datasets.
|
|
134
|
+
|
|
135
|
+
For detailed instructions and additional information, see the [README.md](https://github.com/Sinapsis-AI/sinapsis-huggingface/blob/main/packages/sinapsis_huggingface_grounding_dino/README.md).
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
</details>
|
|
139
|
+
<details>
|
|
140
|
+
<summary id="uv"><strong><span style="font-size: 1.4em;">Sinapsis Hugging Face Transformers</span></strong></summary>
|
|
141
|
+
|
|
142
|
+
This sinapsis package offers advanced capabilities for **text, speech, and image processing tasks**. It includes a variety of customizable inference templates designed for seamless integration into machine learning workflows:
|
|
143
|
+
|
|
144
|
+
- **Text-to-Speech (TTS) Template**: Convert text into high-quality, natural-sounding speech.
|
|
145
|
+
- **Speech-to-Text (STT) Template**: Transcribe spoken audio into text with support for multiple languages.
|
|
146
|
+
- **Translation Template**: Translate text from one language to another with support for various source and target languages.
|
|
147
|
+
- **Summarization Template**: Condense long-form content into concise summaries.
|
|
148
|
+
- **Image-to-Text Template**: Generate textual descriptions from input images.
|
|
149
|
+
|
|
150
|
+
For more details and specific templates, see the [README.md](https://github.com/Sinapsis-AI/sinapsis-huggingface/blob/main/packages/sinapsis_huggingface_transformers/README.md).
|
|
151
|
+
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
For more details, see the [official documentation](https://docs.sinapsis.tech/docs)
|
|
155
|
+
|
|
156
|
+
<h2 id="webapps">🌐 Webapps</h2>
|
|
157
|
+
|
|
158
|
+
The **Sinapsis web applications** provide an interactive way to explore and experiment with AI models. They allow users to generate outputs, test different inputs, and visualize results in real time, making it easy to experience the capabilities of each model. Below are the available webapps and instructions to launch them.
|
|
159
|
+
|
|
160
|
+
> [!IMPORTANT]
|
|
161
|
+
> To run any of the apps, you first need to clone this repo:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git clone git@github.com:Sinapsis-ai/sinapsis-huggingface.git
|
|
165
|
+
cd sinapsis-huggingface
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
> [!NOTE]
|
|
169
|
+
> If you'd like to enable external app sharing in Gradio, `export GRADIO_SHARE_APP=True`
|
|
170
|
+
|
|
171
|
+
> [!NOTE]
|
|
172
|
+
> Agent configuration can be changed through the AGENT_CONFIG_PATH env var. You can check the available configurations in each package configs folder.
|
|
173
|
+
|
|
174
|
+
> [!IMPORTANT]
|
|
175
|
+
> Please make sure you have a valid huggingface access token in order to run the paligemma webapp. For further instructions on how to create an access token see
|
|
176
|
+
https://huggingface.co/docs/transformers.js/en/guides/private
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<details>
|
|
182
|
+
<summary id="docker"><strong><span style="font-size: 1.4em;">🐳 Build with Docker</span></strong></summary>
|
|
183
|
+
|
|
184
|
+
**IMPORTANT** The docker image depends on the sinapsis-nvidia:base image. To build it, refer to the [official sinapsis documentation](https://github.com/Sinapsis-AI/sinapsis/blob/main/README.md#docker)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
1. **Build the sinapsis-huggingface image**:
|
|
188
|
+
```bash
|
|
189
|
+
docker compose -f docker/compose.yaml build
|
|
190
|
+
```
|
|
191
|
+
2. **Start the container**:
|
|
192
|
+
|
|
193
|
+
For Diffusers app
|
|
194
|
+
```bash
|
|
195
|
+
docker compose -f docker/compose_diffusers.yaml up sinapsis-huggingface-diffusers-gradio -d
|
|
196
|
+
```
|
|
197
|
+
For Grounding-Dino app
|
|
198
|
+
```bash
|
|
199
|
+
docker compose -f docker/compose_vision.yaml up sinapsis-huggingface-vision-gradio -d
|
|
200
|
+
```
|
|
201
|
+
For Paligemma app
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
export HF_TOKEN="your_huggingface_token"
|
|
205
|
+
docker compose -f docker/compose_pali_gemma.yaml up sinapsis-huggingface-paligemma-gradio -d
|
|
206
|
+
```
|
|
207
|
+
3. **Check the status**:
|
|
208
|
+
|
|
209
|
+
For Diffusers app
|
|
210
|
+
```bash
|
|
211
|
+
docker logs -f sinapsis-huggingface-diffusers-gradio
|
|
212
|
+
```
|
|
213
|
+
For Grounding-Dino app
|
|
214
|
+
```bash
|
|
215
|
+
docker logs -f sinapsis-huggingface-vision-gradio
|
|
216
|
+
```
|
|
217
|
+
For Paligemma app
|
|
218
|
+
```bash
|
|
219
|
+
docker logs -f sinapsis-huggingface-paligemma-gradio
|
|
220
|
+
```
|
|
221
|
+
**NOTE**: If using the vision app, please change the name of the service accordingly
|
|
222
|
+
|
|
223
|
+
4. **The logs will display the URL to access the webapp, e.g.,**:
|
|
224
|
+
```bash
|
|
225
|
+
Running on local URL: http://127.0.0.1:7860
|
|
226
|
+
```
|
|
227
|
+
**NOTE**: The local URL can be different, please check the logs
|
|
228
|
+
|
|
229
|
+
5. **To stop the app**:
|
|
230
|
+
|
|
231
|
+
For Diffusers app
|
|
232
|
+
```bash
|
|
233
|
+
docker compose -f docker/compose_diffusers.yaml down
|
|
234
|
+
```
|
|
235
|
+
For Grounding-Dino app
|
|
236
|
+
```bash
|
|
237
|
+
docker compose -f docker/compose_vision.yaml down
|
|
238
|
+
```
|
|
239
|
+
For Paligemma app
|
|
240
|
+
```bash
|
|
241
|
+
docker compose -f docker/compose_pali_gemma.yaml down
|
|
242
|
+
```
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary id="uv"><strong><span style="font-size: 1.4em;">📦 UV</span></strong></summary>
|
|
247
|
+
|
|
248
|
+
1. Create the virtual environment and sync the dependencies:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
uv sync --frozen
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
2. Install the dependencies:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
uv pip install sinapsis-huggingface[all] --extra-index-url https://pypi.sinapsis.tech
|
|
258
|
+
```
|
|
259
|
+
3. Run the webapp.
|
|
260
|
+
|
|
261
|
+
For Diffusers app
|
|
262
|
+
```bash
|
|
263
|
+
uv run webapps/diffusers_demo.py
|
|
264
|
+
```
|
|
265
|
+
For Grounding-Dino app
|
|
266
|
+
```bash
|
|
267
|
+
uv run webapps/vision_demo.py
|
|
268
|
+
```
|
|
269
|
+
For Paligemma app
|
|
270
|
+
```bash
|
|
271
|
+
export HF_TOKEN="your_huggingface_token"
|
|
272
|
+
uv run webapps/paligemma_demo.py
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
4. The terminal will display the URL to access the webapp, e.g., :
|
|
276
|
+
```bash
|
|
277
|
+
Running on local URL: http://127.0.0.1:7860
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
</details>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
<h2 id="documentation">📙 Documentation</h2>
|
|
284
|
+
|
|
285
|
+
Documentation is available on the [sinapsis website](https://docs.sinapsis.tech/docs)
|
|
286
|
+
|
|
287
|
+
Tutorials for different projects within sinapsis are available at [sinapsis tutorials page](https://docs.sinapsis.tech/tutorials)
|
|
288
|
+
|
|
289
|
+
<h2 id="license">🔍 License</h2>
|
|
290
|
+
|
|
291
|
+
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the [LICENSE](LICENSE) file.
|
|
292
|
+
|
|
293
|
+
For commercial use, please refer to our [official Sinapsis website](https://sinapsis.tech) for information on obtaining a commercial license.
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
@@ -130,22 +130,28 @@ The **Sinapsis web applications** provide an interactive way to explore and expe
|
|
|
130
130
|
> [!IMPORTANT]
|
|
131
131
|
> To run any of the apps, you first need to clone this repo:
|
|
132
132
|
|
|
133
|
+
```bash
|
|
134
|
+
git clone git@github.com:Sinapsis-ai/sinapsis-huggingface.git
|
|
135
|
+
cd sinapsis-huggingface
|
|
136
|
+
```
|
|
137
|
+
|
|
133
138
|
> [!NOTE]
|
|
134
139
|
> If you'd like to enable external app sharing in Gradio, `export GRADIO_SHARE_APP=True`
|
|
135
140
|
|
|
136
141
|
> [!NOTE]
|
|
137
142
|
> Agent configuration can be changed through the AGENT_CONFIG_PATH env var. You can check the available configurations in each package configs folder.
|
|
138
143
|
|
|
144
|
+
> [!IMPORTANT]
|
|
145
|
+
> Please make sure you have a valid huggingface access token in order to run the paligemma webapp. For further instructions on how to create an access token see
|
|
146
|
+
https://huggingface.co/docs/transformers.js/en/guides/private
|
|
147
|
+
|
|
148
|
+
|
|
139
149
|
|
|
140
|
-
```bash
|
|
141
|
-
git clone git@github.com:Sinapsis-ai/sinapsis-huggingface.git
|
|
142
|
-
cd sinapsis-huggingface
|
|
143
|
-
```
|
|
144
150
|
|
|
145
151
|
<details>
|
|
146
152
|
<summary id="docker"><strong><span style="font-size: 1.4em;">🐳 Build with Docker</span></strong></summary>
|
|
147
153
|
|
|
148
|
-
**IMPORTANT** The docker image depends on the sinapsis-nvidia:base image. To build it, refer to the [official sinapsis documentation](
|
|
154
|
+
**IMPORTANT** The docker image depends on the sinapsis-nvidia:base image. To build it, refer to the [official sinapsis documentation](https://github.com/Sinapsis-AI/sinapsis/blob/main/README.md#docker)
|
|
149
155
|
|
|
150
156
|
|
|
151
157
|
1. **Build the sinapsis-huggingface image**:
|
|
@@ -153,17 +159,35 @@ cd sinapsis-huggingface
|
|
|
153
159
|
docker compose -f docker/compose.yaml build
|
|
154
160
|
```
|
|
155
161
|
2. **Start the container**:
|
|
162
|
+
|
|
163
|
+
For Diffusers app
|
|
156
164
|
```bash
|
|
157
165
|
docker compose -f docker/compose_diffusers.yaml up sinapsis-huggingface-diffusers-gradio -d
|
|
158
166
|
```
|
|
159
|
-
|
|
167
|
+
For Grounding-Dino app
|
|
160
168
|
```bash
|
|
161
169
|
docker compose -f docker/compose_vision.yaml up sinapsis-huggingface-vision-gradio -d
|
|
162
170
|
```
|
|
171
|
+
For Paligemma app
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
export HF_TOKEN="your_huggingface_token"
|
|
175
|
+
docker compose -f docker/compose_pali_gemma.yaml up sinapsis-huggingface-paligemma-gradio -d
|
|
176
|
+
```
|
|
163
177
|
3. **Check the status**:
|
|
178
|
+
|
|
179
|
+
For Diffusers app
|
|
164
180
|
```bash
|
|
165
181
|
docker logs -f sinapsis-huggingface-diffusers-gradio
|
|
166
182
|
```
|
|
183
|
+
For Grounding-Dino app
|
|
184
|
+
```bash
|
|
185
|
+
docker logs -f sinapsis-huggingface-vision-gradio
|
|
186
|
+
```
|
|
187
|
+
For Paligemma app
|
|
188
|
+
```bash
|
|
189
|
+
docker logs -f sinapsis-huggingface-paligemma-gradio
|
|
190
|
+
```
|
|
167
191
|
**NOTE**: If using the vision app, please change the name of the service accordingly
|
|
168
192
|
|
|
169
193
|
4. **The logs will display the URL to access the webapp, e.g.,**:
|
|
@@ -173,9 +197,19 @@ Running on local URL: http://127.0.0.1:7860
|
|
|
173
197
|
**NOTE**: The local URL can be different, please check the logs
|
|
174
198
|
|
|
175
199
|
5. **To stop the app**:
|
|
200
|
+
|
|
201
|
+
For Diffusers app
|
|
176
202
|
```bash
|
|
177
203
|
docker compose -f docker/compose_diffusers.yaml down
|
|
178
204
|
```
|
|
205
|
+
For Grounding-Dino app
|
|
206
|
+
```bash
|
|
207
|
+
docker compose -f docker/compose_vision.yaml down
|
|
208
|
+
```
|
|
209
|
+
For Paligemma app
|
|
210
|
+
```bash
|
|
211
|
+
docker compose -f docker/compose_pali_gemma.yaml down
|
|
212
|
+
```
|
|
179
213
|
</details>
|
|
180
214
|
|
|
181
215
|
<details>
|
|
@@ -194,19 +228,23 @@ uv pip install sinapsis-huggingface[all] --extra-index-url https://pypi.sinapsis
|
|
|
194
228
|
```
|
|
195
229
|
3. Run the webapp.
|
|
196
230
|
|
|
231
|
+
For Diffusers app
|
|
197
232
|
```bash
|
|
198
233
|
uv run webapps/diffusers_demo.py
|
|
199
234
|
```
|
|
200
|
-
|
|
201
|
-
4. The terminal will display the URL to access the webapp, e.g., :
|
|
235
|
+
For Grounding-Dino app
|
|
202
236
|
```bash
|
|
203
|
-
|
|
237
|
+
uv run webapps/vision_demo.py
|
|
238
|
+
```
|
|
239
|
+
For Paligemma app
|
|
240
|
+
```bash
|
|
241
|
+
export HF_TOKEN="your_huggingface_token"
|
|
242
|
+
uv run webapps/paligemma_demo.py
|
|
204
243
|
```
|
|
205
244
|
|
|
206
|
-
|
|
207
|
-
|
|
245
|
+
4. The terminal will display the URL to access the webapp, e.g., :
|
|
208
246
|
```bash
|
|
209
|
-
|
|
247
|
+
Running on local URL: http://127.0.0.1:7860
|
|
210
248
|
```
|
|
211
249
|
|
|
212
250
|
</details>
|