Fix the display of parameters in the history table

#2
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,6 +4,7 @@ from transformers import pipeline
4
  from utils import format_moves
5
  import pandas as pd
6
  import tensorflow as tf
 
7
 
8
  model_checkpoint = "distilgpt2"
9
 
@@ -22,7 +23,7 @@ def update_history(df, move_name, move_desc, generation, parameters):
22
  new_row = [{"Move Name": move_name,
23
  "Move Description": move_desc,
24
  "Generation Type": generation,
25
- "Parameters": parameters}]
26
  return pd.concat([df, pd.DataFrame(new_row)])
27
 
28
 
4
  from utils import format_moves
5
  import pandas as pd
6
  import tensorflow as tf
7
+ import json
8
 
9
  model_checkpoint = "distilgpt2"
10
 
23
  new_row = [{"Move Name": move_name,
24
  "Move Description": move_desc,
25
  "Generation Type": generation,
26
+ "Parameters": json.dumps(parameters)}]
27
  return pd.concat([df, pd.DataFrame(new_row)])
28
 
29