oretunde commited on
Commit
1aafd59
·
verified ·
1 Parent(s): 60d9f14

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -2
  2. app.py +7 -3
Dockerfile CHANGED
@@ -4,13 +4,11 @@ USER user
4
  ENV HOME=/home/user \
5
  PATH=/home/user/.local/bin:$PATH
6
  WORKDIR $HOME/app
7
- COPY --chown=user . $HOME/app
8
  # Run apt-get update and install as root
9
  USER root
10
  RUN apt-get update && apt-get install -y \
11
  build-essential \
12
  curl \
13
- software-properties-common \
14
  git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
4
  ENV HOME=/home/user \
5
  PATH=/home/user/.local/bin:$PATH
6
  WORKDIR $HOME/app
 
7
  # Run apt-get update and install as root
8
  USER root
9
  RUN apt-get update && apt-get install -y \
10
  build-essential \
11
  curl \
 
12
  git \
13
  && rm -rf /var/lib/apt/lists/*
14
 
app.py CHANGED
@@ -34,7 +34,9 @@ def app():
34
  # Provide the details of the plots here
35
  plots = [
36
  {"title": "Top Selling Pizzas (by Quantity)", "x": "pizza_name_id", "y": "quantity", "top": 5},
37
- {"title": "Quantity of Pizzas Sold by Category and Time of the Day","x": "pizza_category", "y": "quantity" , "hue": "time_of_day" , "estimator": "sum"}
 
 
38
  ]
39
 
40
  for plot in plots:
@@ -50,9 +52,11 @@ def app():
50
  plt.tight_layout() # Adjust spacing so labels fit
51
 
52
  if "Quantity of Pizzas" in plot["title"]:
53
- sns.barplot(data=df, x=plot["x"], y=plot["y"], hue=plot["hue"], estimator=plot["estimator"] errorbar=None)
54
- plt.legend(bbox_to_anchor=(1,1));
55
 
 
 
 
56
 
57
  ax.set_xlabel(" ".join(plot["x"].split("_")).capitalize())
58
  if "y" in plot.keys():
 
34
  # Provide the details of the plots here
35
  plots = [
36
  {"title": "Top Selling Pizzas (by Quantity)", "x": "pizza_name_id", "y": "quantity", "top": 5},
37
+ {"title": "Quantity of Pizzas Sold by Category and Time of the Day","x": "pizza_category", "y": "quantity" , "hue": "time_of_day" , "estimator": "sum"},
38
+ {"title": "Quantity of Pizzas Sold by Category and Time of the Day","x": "pizza_size", "y": "quantity" , "hue": "time_of_day" , "estimator": "sum"},
39
+ {"title": "Monthly Revenue Trends by Pizza Category", "x": "order_month", "y": "total_price", "hue": "pizza_category", "estimator": "sum", "style": "pizza_category"},
40
  ]
41
 
42
  for plot in plots:
 
52
  plt.tight_layout() # Adjust spacing so labels fit
53
 
54
  if "Quantity of Pizzas" in plot["title"]:
55
+ sns.barplot(data=df, x=plot["x"], y=plot["y"], hue=plot["hue"], estimator=plot["estimator"], errorbar=None , ax=ax)
 
56
 
57
+ if "Monthly Revenue" in plot["title"]:
58
+ sns.lineplot(data=df, x=plot["x"], y=plot["y"], hue=plot["hue"], estimator=plot["estimator"] , style=plot["style"] , errorbar=None, markers=True , ax=ax)
59
+ plt.xticks(rotation=90);
60
 
61
  ax.set_xlabel(" ".join(plot["x"].split("_")).capitalize())
62
  if "y" in plot.keys():