当前位置: 首页 > news >正文

权威的手机网站制作百度指数查询工具

权威的手机网站制作,百度指数查询工具,sem推广和seo的区别,网站域名年龄GPT-4 Vision 系列: 翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式一翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式二 1. 将任何静态图表转换为动态数据可视化 ChatGPT Vision 不仅可以将涂鸦变成功能齐全的 Streamlit 应用程序,还…

GPT-4 Vision 系列:

  • 翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式一
  • 翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式二

1. 将任何静态图表转换为动态数据可视化

ChatGPT Vision 不仅可以将涂鸦变成功能齐全的 Streamlit 应用程序,还可以将任何静态视觉转换为美观、交互式、动态的数据可视化。

粘贴 Echarts library 库中夜莺玫瑰图 Nightingale rose chart 的屏幕截图:

在这里插入图片描述
包括以下提示词prompt:

Create a nightingale/rose chart in Streamlit. The chart should be a dynamic ECharts chart, via the streamlit-echarts library. Each section should be toggleable. The color scheme of the chart should match the one in the image.

翻译如下:
在 Streamlit 中创建夜莺/玫瑰图表。该图表应该是一个动态的 ECharts 图表,通过 streamlit-echarts 库。每个部分都应该是可切换的。图表的配色方案应与图像中的配色方案相匹配。

将代码复制到编辑器中,瞧!
在这里插入图片描述

该应用程序在 Streamlit 中显示动态玫瑰图表,其中包含图例、可切换的花瓣/部分以及忠实复制原版的调色板!

2. GPT-4 实现

在Streamlit中创建一个动态的ECharts夜莺/玫瑰图表,并且可以切换部分,需要使用streamlit_echarts库,该库允许在Streamlit应用程序中集成ECharts。以下是一个示例代码,演示了如何创建这样的图表:

首先,确保你已经安装了必要的库

pip install streamlit streamlit_echarts

这是Streamlit应用程序的代码:

import streamlit as st
from streamlit_echarts import st_echarts
import numpy as np# Define the data for the chart
categories = [f"rose {i}" for i in range(1, 9)]
values = np.random.randint(10, 100, size=8).tolist()# Define the initial state of each section (all enabled)
initial_state = {category: True for category in categories}# Define the color scheme
colors = ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4"]# Use session state to store the toggle states of the sections
if 'toggle_states' not in st.session_state:st.session_state.toggle_states = initial_state# Define the ECharts options for the nightingale/rose chart
options = {"tooltip": {"trigger": "item","formatter": "{a} <br/>{b} : {c} ({d}%)"},"legend": {"left": "center","top": "bottom","data": categories},"toolbox": {"show": True,"feature": {"saveAsImage": {"show": True, "title": "Save Image"}}},"series": [{"name": "Roses","type": "pie","radius": [20, 140],"center": ["50%", "50%"],"roseType": "radius","itemStyle": {"borderRadius": 5},"label": {"show": True},"emphasis": {"label": {"show": True}},"data": [{"value": values[i], "name": categories[i], "itemStyle": {"color": colors[i]}}for i in range(8) if st.session_state.toggle_states[categories[i]]]}]
}# Checkbox for toggling sections
for i, category in enumerate(categories):st.session_state.toggle_states[category] = st.sidebar.checkbox(category, value=st.session_state.toggle_states[category])# Render the ECharts chart in the Streamlit app
st_echarts(options=options, height="500px")

这个Streamlit应用程序将显示一个夜莺/玫瑰图表,其中包含可以使用复选框切换打开和关闭的数据部分。颜色方案由颜色数组定义,每个部分的颜色在系列选项的数据属性中设置。

要运行该应用程序,请将代码保存在一个Python文件中(例如,nightingale_rose_chart.py),然后使用Streamlit执行它。

streamlit run Vision/nightingale_rose_chart.py 

请根据您的具体用例调整数值和颜色,以匹配数据和配色方案。

代码

https://github.com/zgpeace/pets-name-langchain/tree/develop

参考

https://blog.streamlit.io/7-ways-gpt-4-vision-can-uplevel-your-streamlit-apps/

http://www.tj-hxxt.cn/news/93869.html

相关文章:

  • 做网站余姚seo数据分析哪些方面
  • 饲料网站建设 中企动力推广接单平台
  • 南京哪家公司做企业网站 做得比较好朋友圈营销广告
  • wordpress账号密码数据库百色seo快速排名
  • 搭建什么网站赚钱应用宝aso优化
  • 新手做网站应该注意什么外贸营销网站
  • 什么是可信网站认证北京百度推广电话
  • 手机网站建设 小程序短视频营销案例
  • 单页网站seo杭州seo网站优化
  • 怎么知道自己的网站被k市场营销一般在哪上班
  • 扁平化设计 科技感网站素材发布软文的平台
  • 营销型网站建设宣传语seo推广软件
  • 无锡网站制作价格seo工资待遇怎么样
  • 做微信封面模板下载网站seo技术是什么
  • 企业自助建站网seogw
  • 山西手机版建站系统信息国内ip地址 免费
  • dw网页代码模板徐州seo代理计费
  • 喜茶vi设计案例分析ppt深圳排名seo公司
  • 温州市建设工程管理网站子域名在线查询
  • 在家给别人做网站合法吗seo整合营销
  • 做网站销售电销好做吗软件推广的渠道是哪里找的
  • 东城住房和城乡建设委员会网站上海百度推广开户
  • 代备案网站大概需要多少钱
  • 做专业的精品套图网站最新国际消息
  • 徐州个人建站模板app开发公司推荐
  • 做视频直播网站需要办理什么资质seo 知乎
  • 手机网站域名和pc域名的区别seo是什么级别
  • 做水果的b2b网站怎么样创建网站
  • 深圳品牌服装批发市场网络优化工程师为什么都说坑人
  • php制作网站用什么软件google收录查询