how can i write my source code in python so that it works in DASH framework : i have written my code in python using Jupyer Notebook and is working fine.
I need help on how to write that code in DASH or make it work in dash

```
PATH = 'products.csv'
data = pd.read_csv(PATH)
colors = ['#f4cb42', '#cd7f32', '#a1a8b5'] #gold,bronze,silver

medal_counts = data.Categories.value_counts(sort=True)

labels = medal_counts.index

values = medal_counts.values

pie = go.Pie(labels=labels, values=values, marker=dict(colors=colors))

layout = go.Layout(title='Sales by CATEGORIES ')

fig = go.Figure(data=[pie], layout=layout)

py.iplot(fig)
```

the code draws a pie chart