Spaces:
Running
Running
chore: update something
Browse files- README.md +2 -2
- lightweight_embeddings/__init__.py +7 -3
- lightweight_embeddings/router.py +4 -1
- lightweight_embeddings/service.py +4 -0
README.md
CHANGED
@@ -21,8 +21,8 @@ header: mini
|
|
21 |
- **Reranking Support**: Includes powerful reranking capabilities for both text and image inputs.
|
22 |
- **Optimized for Speed**: Built with lightweight transformer models and efficient backends for rapid inference, even on low-resource systems.
|
23 |
- **Flexible Model Support**: Use a range of transformer models tailored to diverse use cases:
|
24 |
-
- Text models: `multilingual-e5-small`, `paraphrase-multilingual-MiniLM-L12-v2`, `bge-m3
|
25 |
-
- Image model: `
|
26 |
- **Production-Ready**: Easily deploy anywhere with Docker for hassle-free setup.
|
27 |
- **Interactive Playground**: Test embeddings and reranking directly via a **Gradio-powered interface** alongside detailed REST API documentation.
|
28 |
|
|
|
21 |
- **Reranking Support**: Includes powerful reranking capabilities for both text and image inputs.
|
22 |
- **Optimized for Speed**: Built with lightweight transformer models and efficient backends for rapid inference, even on low-resource systems.
|
23 |
- **Flexible Model Support**: Use a range of transformer models tailored to diverse use cases:
|
24 |
+
- Text models: `multilingual-e5-small`, `multilingual-e5-base`, `multilingual-e5-large`, `snowflake-arctic-embed-l-v2.0`, `paraphrase-multilingual-MiniLM-L12-v2`, `paraphrase-multilingual-mpnet-base-v2`, `bge-m3`.
|
25 |
+
- Image model: `siglip-base-patch16-256-multilingual`
|
26 |
- **Production-Ready**: Easily deploy anywhere with Docker for hassle-free setup.
|
27 |
- **Interactive Playground**: Test embeddings and reranking directly via a **Gradio-powered interface** alongside detailed REST API documentation.
|
28 |
|
lightweight_embeddings/__init__.py
CHANGED
@@ -7,7 +7,11 @@ This application provides text and image embeddings using multiple text models a
|
|
7 |
|
8 |
Supported text model IDs:
|
9 |
- "multilingual-e5-small"
|
|
|
|
|
|
|
10 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
|
|
11 |
- "bge-m3"
|
12 |
|
13 |
Supported image model ID:
|
@@ -130,10 +134,10 @@ def create_main_interface():
|
|
130 |
"""
|
131 |
# Available model options for the dropdown
|
132 |
model_options = [
|
|
|
133 |
"multilingual-e5-small",
|
134 |
"multilingual-e5-base",
|
135 |
"multilingual-e5-large",
|
136 |
-
"snowflake-arctic-embed-l-v2.0",
|
137 |
"paraphrase-multilingual-MiniLM-L12-v2",
|
138 |
"paraphrase-multilingual-mpnet-base-v2",
|
139 |
"bge-m3",
|
@@ -184,7 +188,7 @@ def create_main_interface():
|
|
184 |
-H 'accept: application/json' \\
|
185 |
-H 'Content-Type: application/json' \\
|
186 |
-d '{
|
187 |
-
"model": "
|
188 |
"input": "That is a happy person"
|
189 |
}'
|
190 |
```
|
@@ -196,7 +200,7 @@ def create_main_interface():
|
|
196 |
-H 'accept: application/json' \\
|
197 |
-H 'Content-Type: application/json' \\
|
198 |
-d '{
|
199 |
-
"model": "
|
200 |
"queries": "That is a happy person",
|
201 |
"candidates": [
|
202 |
"That is a happy dog",
|
|
|
7 |
|
8 |
Supported text model IDs:
|
9 |
- "multilingual-e5-small"
|
10 |
+
- "multilingual-e5-base"
|
11 |
+
- "multilingual-e5-large"
|
12 |
+
- "snowflake-arctic-embed-l-v2.0"
|
13 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
14 |
+
- "paraphrase-multilingual-mpnet-base-v2"
|
15 |
- "bge-m3"
|
16 |
|
17 |
Supported image model ID:
|
|
|
134 |
"""
|
135 |
# Available model options for the dropdown
|
136 |
model_options = [
|
137 |
+
"snowflake-arctic-embed-l-v2.0",
|
138 |
"multilingual-e5-small",
|
139 |
"multilingual-e5-base",
|
140 |
"multilingual-e5-large",
|
|
|
141 |
"paraphrase-multilingual-MiniLM-L12-v2",
|
142 |
"paraphrase-multilingual-mpnet-base-v2",
|
143 |
"bge-m3",
|
|
|
188 |
-H 'accept: application/json' \\
|
189 |
-H 'Content-Type: application/json' \\
|
190 |
-d '{
|
191 |
+
"model": "snowflake-arctic-embed-l-v2.0",
|
192 |
"input": "That is a happy person"
|
193 |
}'
|
194 |
```
|
|
|
200 |
-H 'accept: application/json' \\
|
201 |
-H 'Content-Type: application/json' \\
|
202 |
-d '{
|
203 |
+
"model": "snowflake-arctic-embed-l-v2.0",
|
204 |
"queries": "That is a happy person",
|
205 |
"candidates": [
|
206 |
"That is a happy dog",
|
lightweight_embeddings/router.py
CHANGED
@@ -5,12 +5,15 @@ Exposes the EmbeddingsService methods via a RESTful API.
|
|
5 |
|
6 |
Supported Text Model IDs:
|
7 |
- "multilingual-e5-small"
|
|
|
|
|
|
|
8 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
|
|
9 |
- "bge-m3"
|
10 |
|
11 |
Supported Image Model IDs:
|
12 |
- "siglip-base-patch16-256-multilingual"
|
13 |
-
(Extend as needed)
|
14 |
"""
|
15 |
|
16 |
from __future__ import annotations
|
|
|
5 |
|
6 |
Supported Text Model IDs:
|
7 |
- "multilingual-e5-small"
|
8 |
+
- "multilingual-e5-base"
|
9 |
+
- "multilingual-e5-large"
|
10 |
+
- "snowflake-arctic-embed-l-v2.0"
|
11 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
12 |
+
- "paraphrase-multilingual-mpnet-base-v2"
|
13 |
- "bge-m3"
|
14 |
|
15 |
Supported Image Model IDs:
|
16 |
- "siglip-base-patch16-256-multilingual"
|
|
|
17 |
"""
|
18 |
|
19 |
from __future__ import annotations
|
lightweight_embeddings/service.py
CHANGED
@@ -12,7 +12,11 @@ Features:
|
|
12 |
|
13 |
Supported Text Model IDs:
|
14 |
- "multilingual-e5-small"
|
|
|
|
|
|
|
15 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
|
|
16 |
- "bge-m3"
|
17 |
|
18 |
Supported Image Model IDs:
|
|
|
12 |
|
13 |
Supported Text Model IDs:
|
14 |
- "multilingual-e5-small"
|
15 |
+
- "multilingual-e5-base"
|
16 |
+
- "multilingual-e5-large"
|
17 |
+
- "snowflake-arctic-embed-l-v2.0"
|
18 |
- "paraphrase-multilingual-MiniLM-L12-v2"
|
19 |
+
- "paraphrase-multilingual-mpnet-base-v2"
|
20 |
- "bge-m3"
|
21 |
|
22 |
Supported Image Model IDs:
|