-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use #2
Comments
Indeed, I am also not sure how this project works with DB-GPT. |
文档写依赖gpt-vis包,我去npm仓库看了,那个包是空包,这个项目的文档是不是有问题?只有一个markdown的运行展示 |
关注 #4,这两天发布新版本。 |
$ npm i @antv/gpt-vis --save
import { GPTVis } from '@antv/gpt-vis';
const markdownContent = `
# GPT-VIS \n\nComponents for GPTs, generative AI, and LLM projects. Not only UI Components.
Here’s a visualization of Haidilao's food delivery revenue from 2013 to 2022. You can see a steady increase over the years, with notable *growth* particularly in recent years.
\`\`\`vis-chart
{"type": "line","data": [{"time":2013,"value":59.3},{"time":2014,"value":64.4},{"time":2015,"value":68.9},{"time":2016,"value":74.4},{"time":2017,"value":82.7},{"time":2018,"value":91.9},{"time":2019,"value":99.1},{"time":2020,"value":101.6},{"time":2021,"value":114.4},{"time":2022,"value":121}]}
\`\`\`
`;
export default () => {
return <GPTVis>{markdownContent}</GPTVis>;
};
import { GPTVis, withDefaultChartCode } from '@antv/gpt-vis';
const markdownContent = `
\`\`\`my-ui
my data
\`\`\`
`;
const customRenderers = { 'my-ui': ({ children }) => <div>{children}</div> };
const components = {
code: withDefaultChartCode({ languageRenderers: customRenderers }),
};
export default () => {
return <GPTVis components={components}>{markdownContent}</GPTVis>;
};
import streamlit as st
from streamlit_gpt_vis import set_gpt_vis
content = '''
Here’s a visualization of Haidilao's food delivery revenue from 2013 to 2022. You can see a steady increase over the years, with notable *growth* particularly in recent years.
\`\`\`vis-chart
{"type": "line","data": [{"time":2013,"value":59.3},{"time":2014,"value":64.4},{"time":2015,"value":68.9},{"time":2016,"value":74.4},{"time":2017,"value":82.7},{"time":2018,"value":91.9},{"time":2019,"value":99.1},{"time":2020,"value":101.6},{"time":2021,"value":114.4},{"time":2022,"value":121}]}
\`\`\`
'''
set_gpt_vis(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi its a great work!
I Would Like To Ask If There Is A Document Or Tutorial Explaining How To Use It 。The Project Displays An Empty Page When It Is Started。
The text was updated successfully, but these errors were encountered: