Learn how to create multi-tab applications.

An application may have multiple tabs. Here's an example of a simple application with two tabs: "Scatter Chart" and "Bar Chart":

import dstack as ds
import as px
# Create an instance of the application
app =
# Create a tab
scatter_tab ="Scatter Chart")
# Create an output with a chart
scatter_tab.output(data=px.scatter(, x="sepal_width", y="sepal_length", color="species"))
# Create a tab
bar_tab ="Bar Chart")
# Create an output with a chart
bar_tab.output(, x="sex", y="total_bill", color="smoker", barmode="group"))
# Deploy the application with the name "tabs" and print its URL
url = app.deploy("tabs")

If you open the application, you'll see the following:

When you invoke the function, you get an instance of dstack.ApplicationBase which has pretty much all functions that dstack.Application has so you can change its layout, and add controls.

Check out the following tutorial that uses a bit more complex layouts within multiple tabs: