-
Notifications
You must be signed in to change notification settings - Fork 151
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
1 parent
def3b77
commit b955edb
Showing
4 changed files
with
64 additions
and
4 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from vizro import Vizro | ||
from vizro_ai import VizroAI | ||
import vizro.plotly.express as px | ||
import pandas as pd | ||
import vizro.models as vm | ||
import plotly.express as px | ||
|
||
|
||
Vizro._reset() | ||
vizro_ai = VizroAI(model="gpt-4-turbo") | ||
|
||
gapminder_data = px.data.gapminder() | ||
tips_data = px.data.tips() | ||
|
||
dfs=[gapminder_data, tips_data] | ||
input_text = ( | ||
"Create a dashboard that displays the Gapminder dataset and the tips dataset. " | ||
"page1 displays the Gapminder dataset. use a graph to display the data summary. " | ||
"add a filter to filter by year. " | ||
"Use a card to explain what Gapminder dataset is about. " | ||
"The card should only take 1/6 of the whole page. " | ||
"The rest of the page should be the graph or table. Don't create empty space." | ||
"page2 displays the tips dataset. use two different charts to help me understand the data " | ||
"distributions. one chart should be a bar chart and the other should be a scatter plot. " | ||
"first chart is on the left and the second chart is on the right. " | ||
"add a filter to filter one of the categorical columns." | ||
) | ||
|
||
if __name__ == "__main__": | ||
res = vizro_ai.dashboard(dfs=dfs, user_input=input_text, return_elements=True) | ||
vizro_ai.run_dashboard(res.dashboard, res.metadata) |
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
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