joaogante HF staff commited on
Commit
1ccbed1
1 Parent(s): fef8bd5

fiddle with plots

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -139,6 +139,7 @@ BENCHMARK_DATA = {
139
  },
140
  }
141
  FIGURE_PATH = "plt.png"
 
142
 
143
 
144
  def get_plot(model_name, plot_eager, generate_type):
@@ -148,6 +149,7 @@ def get_plot(model_name, plot_eager, generate_type):
148
  if plot_eager == "No":
149
  df = df[df["framework"] != "TF (Eager Execition)"]
150
 
 
151
  g = sns.catplot(
152
  data=df,
153
  kind="bar",
@@ -166,7 +168,7 @@ def get_plot(model_name, plot_eager, generate_type):
166
  for i in ax.containers:
167
  ax.bar_label(i,)
168
 
169
- plt.savefig(FIGURE_PATH, dpi=100)
170
  return FIGURE_PATH
171
 
172
  demo = gr.Blocks()
 
139
  },
140
  }
141
  FIGURE_PATH = "plt.png"
142
+ FIG_DPI = 300
143
 
144
 
145
  def get_plot(model_name, plot_eager, generate_type):
 
149
  if plot_eager == "No":
150
  df = df[df["framework"] != "TF (Eager Execition)"]
151
 
152
+ plt.figure(figsize=(800 / FIG_DPI, 800 / FIG_DPI))
153
  g = sns.catplot(
154
  data=df,
155
  kind="bar",
 
168
  for i in ax.containers:
169
  ax.bar_label(i,)
170
 
171
+ plt.savefig(FIGURE_PATH, dpi=FIG_DPI)
172
  return FIGURE_PATH
173
 
174
  demo = gr.Blocks()