Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketmaurya committed Jun 13, 2024
1 parent 3b38cca commit 5b0e6b8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,26 @@ if __name__ == "__main__":

</details>

<details>
<summary>Customize endpoint path</summary>

&nbsp;

By default, LitServe exposes the `/predict` endpoint for serving the model.
You can customize this endpoint path by providing the `api_path` argument in `LitServer` as follows:

```python
import litserve as ls
from litserve.examples import SimpleLitAPI

if __name__ == '__main__':
api = SimpleLitAPI()
server = ls.LitServer(api, api_path="/my_api/classify")
server.run(port=8000)
```

</details>

&nbsp;

> [!NOTE]
Expand Down

0 comments on commit 5b0e6b8

Please sign in to comment.