Spaces:
Running
Running
chore: update something
Browse files- Dockerfile +3 -3
- README.md +5 -5
- lightweight_embeddings/__init__.py +1 -1
Dockerfile
CHANGED
@@ -26,9 +26,9 @@ COPY --chown=user . .
|
|
26 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
27 |
|
28 |
# Expose service port
|
29 |
-
EXPOSE
|
30 |
|
31 |
# Launch FastAPI application using uvicorn server
|
32 |
# --host 0.0.0.0: Listen on all network interfaces
|
33 |
-
# --port
|
34 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
26 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
27 |
|
28 |
# Expose service port
|
29 |
+
EXPOSE 7860
|
30 |
|
31 |
# Launch FastAPI application using uvicorn server
|
32 |
# --host 0.0.0.0: Listen on all network interfaces
|
33 |
+
# --port 7860: Run on port 7860
|
34 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
@@ -41,10 +41,10 @@ cd lightweight-embeddings
|
|
41 |
Make sure Docker is installed and running on your machine.
|
42 |
```bash
|
43 |
docker build -t lightweight-embeddings .
|
44 |
-
docker run -p
|
45 |
```
|
46 |
|
47 |
-
The API will now be accessible at `http://localhost:
|
48 |
|
49 |
## π API Overview
|
50 |
|
@@ -53,14 +53,14 @@ The API will now be accessible at `http://localhost:8000`.
|
|
53 |
- **`/v1/rank`**: Rank candidate inputs based on similarity to a query.
|
54 |
|
55 |
### Interactive Docs
|
56 |
-
- Visit the [Swagger UI](http://localhost:
|
57 |
-
- Explore additional resources with [ReDoc](http://localhost:
|
58 |
|
59 |
## π¬ Playground
|
60 |
|
61 |
### Embeddings Playground
|
62 |
- Test text and image embedding generation in the browser with a user-friendly **Gradio interface**.
|
63 |
-
- Simply visit `http://localhost:
|
64 |
|
65 |
## π Resources
|
66 |
|
|
|
41 |
Make sure Docker is installed and running on your machine.
|
42 |
```bash
|
43 |
docker build -t lightweight-embeddings .
|
44 |
+
docker run -p 7860:7860 lightweight-embeddings
|
45 |
```
|
46 |
|
47 |
+
The API will now be accessible at `http://localhost:7860`.
|
48 |
|
49 |
## π API Overview
|
50 |
|
|
|
53 |
- **`/v1/rank`**: Rank candidate inputs based on similarity to a query.
|
54 |
|
55 |
### Interactive Docs
|
56 |
+
- Visit the [Swagger UI](http://localhost:7860/docs) for detailed, interactive documentation.
|
57 |
+
- Explore additional resources with [ReDoc](http://localhost:7860/redoc).
|
58 |
|
59 |
## π¬ Playground
|
60 |
|
61 |
### Embeddings Playground
|
62 |
- Test text and image embedding generation in the browser with a user-friendly **Gradio interface**.
|
63 |
+
- Simply visit `http://localhost:7860` after starting the server to access the playground.
|
64 |
|
65 |
## π Resources
|
66 |
|
lightweight_embeddings/__init__.py
CHANGED
@@ -27,7 +27,7 @@ __author__ = "lamhieu"
|
|
27 |
__description__ = "Fast, lightweight, multilingual embeddings solution."
|
28 |
|
29 |
# Set your embeddings API URL here (change host/port if needed)
|
30 |
-
EMBEDDINGS_API_URL = "http://localhost:
|
31 |
|
32 |
# Initialize FastAPI application
|
33 |
app = FastAPI(
|
|
|
27 |
__description__ = "Fast, lightweight, multilingual embeddings solution."
|
28 |
|
29 |
# Set your embeddings API URL here (change host/port if needed)
|
30 |
+
EMBEDDINGS_API_URL = "http://localhost:7860/v1/embeddings"
|
31 |
|
32 |
# Initialize FastAPI application
|
33 |
app = FastAPI(
|