Update m3_server.py
Browse files- m3_server.py +5 -5
m3_server.py
CHANGED
|
@@ -185,7 +185,7 @@ description = dedent(
|
|
| 185 |
embed example:
|
| 186 |
```bash
|
| 187 |
curl -X 'POST' \
|
| 188 |
-
'https://
|
| 189 |
-H 'accept: application/json' \
|
| 190 |
-H 'Content-Type: application/json' \
|
| 191 |
-d '{
|
|
@@ -202,14 +202,14 @@ description = dedent(
|
|
| 202 |
)
|
| 203 |
|
| 204 |
app = FastAPI(
|
| 205 |
-
title="Serving
|
| 206 |
-
# description="Swagger UI at https://
|
| 207 |
description=description,
|
| 208 |
version="0.1.0a0",
|
| 209 |
)
|
| 210 |
|
| 211 |
# Initialize the model and request processor
|
| 212 |
-
model = m3Wrapper("
|
| 213 |
processor = RequestProcessor(
|
| 214 |
model, accumulation_timeout=request_flush_timeout, max_request_to_flush=max_request
|
| 215 |
)
|
|
@@ -235,7 +235,7 @@ async def timeout_middleware(request: Request, call_next):
|
|
| 235 |
@app.get("/")
|
| 236 |
async def landing():
|
| 237 |
"""Define landing page."""
|
| 238 |
-
# return "Swagger UI at https://
|
| 239 |
return RedirectResponse("/docs")
|
| 240 |
|
| 241 |
|
|
|
|
| 185 |
embed example:
|
| 186 |
```bash
|
| 187 |
curl -X 'POST' \
|
| 188 |
+
'https://evgensoft-baai-m3.hf.space/embed/' \
|
| 189 |
-H 'accept: application/json' \
|
| 190 |
-H 'Content-Type: application/json' \
|
| 191 |
-d '{
|
|
|
|
| 202 |
)
|
| 203 |
|
| 204 |
app = FastAPI(
|
| 205 |
+
title="Serving deepvk/USER-bge-m3 embed and rerank",
|
| 206 |
+
# description="Swagger UI at https://evgensoft-baai-m3.hf.space/docs",
|
| 207 |
description=description,
|
| 208 |
version="0.1.0a0",
|
| 209 |
)
|
| 210 |
|
| 211 |
# Initialize the model and request processor
|
| 212 |
+
model = m3Wrapper("deepvk/USER-bge-m3")
|
| 213 |
processor = RequestProcessor(
|
| 214 |
model, accumulation_timeout=request_flush_timeout, max_request_to_flush=max_request
|
| 215 |
)
|
|
|
|
| 235 |
@app.get("/")
|
| 236 |
async def landing():
|
| 237 |
"""Define landing page."""
|
| 238 |
+
# return "Swagger UI at https://evgensoft-baai-m3.hf.space/docs"
|
| 239 |
return RedirectResponse("/docs")
|
| 240 |
|
| 241 |
|