generated from xinetzone/xbook
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
|
||
```{toctree} | ||
fastapi/index | ||
nicegui <https://xinetzone.github.io/vision/ext/nicegui/> | ||
others/index | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# `flet` | ||
|
||
参考:[flet](https://flet.dev/docs/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Gradio | ||
|
||
```{toctree} | ||
intro | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Gradio 简介" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Running on local URL: http://0.0.0.0:4099\n", | ||
"\n", | ||
"To create a public link, set `share=True` in `launch()`.\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div><iframe src=\"http://localhost:4099/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
}, | ||
{ | ||
"data": { | ||
"text/plain": [] | ||
}, | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import gradio as gr\n", | ||
"import plotly.express as px\n", | ||
"import pandas as pd\n", | ||
"def plotly_plot():\n", | ||
" # prepare some data\n", | ||
" x = [\"Math\", \"Business\", \"Statistics\", \"IT\", \"Commerce\"]\n", | ||
" y = [68, 73, 82, 74, 85]\n", | ||
" data = pd.DataFrame()\n", | ||
" data['Subject'] = x\n", | ||
" data['Score'] = y\n", | ||
" # create a new plot\n", | ||
" p = px.bar(data, x='Subject', y='Score')\n", | ||
"\n", | ||
" return p\n", | ||
"\n", | ||
"# show the results\n", | ||
"outputs = gr.Plot()\n", | ||
"\n", | ||
"demo = gr.Interface(fn=plotly_plot, inputs=None, outputs=outputs)\n", | ||
"\n", | ||
"# demo.launch()\n", | ||
"demo.launch(server_name=\"0.0.0.0\", server_port=4099, share=False, inbrowser=False)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "py311", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.7" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 其他 | ||
|
||
```{toctree} | ||
pywebio/index | ||
flet/index | ||
gradio/index | ||
streamlit/index | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# PyWebIO | ||
|
||
参考:[PyWebIO](https://pywebio.readthedocs.io/zh-cn/latest/index.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 无 SSO 认证 | ||
|
||
参考:- [无 SSO 认证](https://docs.streamlit.io/knowledge-base/deploy/authentication-without-sso) | ||
|
||
本指南展示了两种简单的技术,使用密钥管理将基本身份验证添加到 Streamlit 应用程序中。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Streamlit 部署 | ||
|
||
已经部署 [streamlit-demo](https://github.com/xinetzone/streamlit-demo) 到 [https://xinetzone.streamlit.app](https://xinetzone.streamlit.app)。 | ||
|
||
如果想要嵌入到 iframe,只需要在网站后添加 `/?embed=true`。 | ||
|
||
[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://xinetzone.streamlit.app) | ||
|
||
[streamlit-jupyter](https://github.com/ddobrinskiy/streamlit-jupyter) 使 streamlit 可以在 Jupyter Notebook 中运行。 | ||
|
||
|
||
```{toctree} | ||
:glob: | ||
* | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# streamlit | ||
|
||
- 集成 plotly:[plotly_chart](https://docs.streamlit.io/library/api-reference/charts/st.plotly_chart) | ||
- [plotly.streamlit.app](https://plotly.streamlit.app/) | ||
|
||
|
||
```{toctree} | ||
deploy/index | ||
ai-stream<https://xinetzone.streamlit.app> | ||
``` |