feat: api endpoint url in admin page. (#70)

add-more-languages
Meng Zhang 2023-04-09 20:00:22 +08:00 committed by GitHub
parent b9f902e5fc
commit 9915c57e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 3 deletions

30
poetry.lock generated
View File

@ -2753,6 +2753,21 @@ watchdog = {version = "*", markers = "platform_system != \"Darwin\""}
[package.extras]
snowflake = ["snowflake-snowpark-python"]
[[package]]
name = "streamlit-js-eval"
version = "0.1.5"
description = "A custom Streamlit component to evaluate arbitrary Javascript expressions."
category = "main"
optional = false
python-versions = ">=3.8"
files = [
{file = "streamlit_js_eval-0.1.5-py3-none-any.whl", hash = "sha256:86f092497d1254fd5820bcc3e389a35e9dc638684398a8fa945d0d0b9034fa4a"},
{file = "streamlit_js_eval-0.1.5.tar.gz", hash = "sha256:3fa9502d6895057aaf8922edadfa1659a764b5b01da5dfe7fdd52eeac32658c0"},
]
[package.dependencies]
streamlit = ">=1.0.0"
[[package]]
name = "sympy"
version = "1.11.1"
@ -2855,6 +2870,10 @@ category = "main"
optional = false
python-versions = ">=3.8.0"
files = [
{file = "torch-2.0.0-1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:c9090bda7d2eeeecd74f51b721420dbeb44f838d4536cc1b284e879417e3064a"},
{file = "torch-2.0.0-1-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:bd42db2a48a20574d2c33489e120e9f32789c4dc13c514b0c44272972d14a2d7"},
{file = "torch-2.0.0-1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8969aa8375bcbc0c2993e7ede0a7f889df9515f18b9b548433f412affed478d9"},
{file = "torch-2.0.0-1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:ab2da16567cb55b67ae39e32d520d68ec736191d88ac79526ca5874754c32203"},
{file = "torch-2.0.0-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:7a9319a67294ef02459a19738bbfa8727bb5307b822dadd708bc2ccf6c901aca"},
{file = "torch-2.0.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:9f01fe1f6263f31bd04e1757946fd63ad531ae37f28bb2dbf66f5c826ee089f4"},
{file = "torch-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:527f4ae68df7b8301ee6b1158ca56350282ea633686537b30dbb5d7b4a52622a"},
@ -3017,6 +3036,15 @@ category = "main"
optional = false
python-versions = "*"
files = [
{file = "triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38806ee9663f4b0f7cd64790e96c579374089e58f49aac4a6608121aa55e2505"},
{file = "triton-2.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:226941c7b8595219ddef59a1fdb821e8c744289a132415ddd584facedeb475b1"},
{file = "triton-2.0.0-1-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4c9fc8c89874bc48eb7e7b2107a9b8d2c0bf139778637be5bfccb09191685cfd"},
{file = "triton-2.0.0-1-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d2684b6a60b9f174f447f36f933e9a45f31db96cb723723ecd2dcfd1c57b778b"},
{file = "triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9d4978298b74fcf59a75fe71e535c092b023088933b2f1df933ec32615e4beef"},
{file = "triton-2.0.0-1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:74f118c12b437fb2ca25e1a04759173b517582fcf4c7be11913316c764213656"},
{file = "triton-2.0.0-1-pp37-pypy37_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9618815a8da1d9157514f08f855d9e9ff92e329cd81c0305003eb9ec25cc5add"},
{file = "triton-2.0.0-1-pp38-pypy38_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aca3303629cd3136375b82cb9921727f804e47ebee27b2677fef23005c3851a"},
{file = "triton-2.0.0-1-pp39-pypy39_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e3e13aa8b527c9b642e3a9defcc0fbd8ffbe1c80d8ac8c15a01692478dc64d8a"},
{file = "triton-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f05a7e64e4ca0565535e3d5d3405d7e49f9d308505bb7773d21fb26a4c008c2"},
{file = "triton-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb4b99ca3c6844066e516658541d876c28a5f6e3a852286bbc97ad57134827fd"},
{file = "triton-2.0.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47b4d70dc92fb40af553b4460492c31dc7d3a114a979ffb7a5cdedb7eb546c08"},
@ -3534,4 +3562,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "df2b6abe8684f976034d432760b5475e48695b2d2557ca4ddf32cf591c5d4475"
content-hash = "a0e7c6477e505c9e31b7cb862e95d7b85e44f734f4731ea55ad518f0bce8362a"

View File

@ -22,6 +22,7 @@ peft = {git = "https://github.com/huggingface/peft.git", rev = "v0.2.0"}
duckdb = "^0.7.1"
torch = "^2.0.0"
bitsandbytes = "^0.37.2"
streamlit-js-eval = "^0.1.5"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.1.1"

View File

@ -1,4 +1,5 @@
import streamlit as st
from streamlit_js_eval import get_page_location
from utils.service_info import ServiceInfo
from utils.streamlit import set_page_config
@ -17,6 +18,7 @@ def make_badge_markdown(x: ServiceInfo):
set_page_config(page_title="Home")
badges = " ".join(map(make_badge_markdown, SERVICES))
server_url = get_page_location()["origin"]
st.markdown(
"""
## Tabby [![github star](https://img.shields.io/github/stars/TabbyML/tabby?style=social)](http://github.com/TabbyML/tabby)
@ -26,13 +28,18 @@ st.markdown(
**Congrats, your server is live!**
To get started with Tabby, you can either install the extensions below or use the [Editor](./Editor).
Below is the URL for your API endpoint.
```
{server_url}
```
### Extensions
### Clients
* [VSCode](https://marketplace.visualstudio.com/items?itemName=TabbyML.vscode-tabby)
""".replace(
"{badges}", badges
).replace(
"{server_url}", server_url
)
)