Raman Dutt commited on
Commit
8b182af
·
1 Parent(s): 9e976f8

bar plot params changed

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -107,6 +107,7 @@ def predict(
107
  OUTPUT_DIR="OUTPUT",
108
  ):
109
 
 
110
  NUM_TUNABLE_PARAMS = {
111
  "full": 86,
112
  "attention": 26.7,
@@ -139,8 +140,6 @@ def predict(
139
  result_pil_image = result_image["images"][0]
140
 
141
  # Create a Bar Plot displaying the number of tunable parameters for the selected PEFT Type
142
- # Create a Pandas DataFrame
143
-
144
  df = pd.DataFrame(
145
  {
146
  "PEFT Type": list(NUM_TUNABLE_PARAMS.keys()),
@@ -154,13 +153,14 @@ def predict(
154
 
155
  bar_plot = gr.BarPlot(
156
  value=df,
157
- x="PEFT Type",
158
  y="Number of Tunable Parameters",
159
- label="PEFT Type",
160
  title="Number of Tunable Parameters",
161
  vertical=True,
162
  height=300,
163
  width=300,
 
 
164
  )
165
 
166
  return result_pil_image, bar_plot
 
107
  OUTPUT_DIR="OUTPUT",
108
  ):
109
 
110
+ BARPLOT_TITLE = "Tunable Parameters for {} Fine-Tuning".format(unet_pretraining_type)
111
  NUM_TUNABLE_PARAMS = {
112
  "full": 86,
113
  "attention": 26.7,
 
140
  result_pil_image = result_image["images"][0]
141
 
142
  # Create a Bar Plot displaying the number of tunable parameters for the selected PEFT Type
 
 
143
  df = pd.DataFrame(
144
  {
145
  "PEFT Type": list(NUM_TUNABLE_PARAMS.keys()),
 
153
 
154
  bar_plot = gr.BarPlot(
155
  value=df,
156
+ x="Fine-Tuning Strategy",
157
  y="Number of Tunable Parameters",
 
158
  title="Number of Tunable Parameters",
159
  vertical=True,
160
  height=300,
161
  width=300,
162
+ title=BARPLOT_TITLE,
163
+ interactive=True,
164
  )
165
 
166
  return result_pil_image, bar_plot