albertvillanova HF staff commited on
Commit
8c2cbf9
1 Parent(s): 9e63bd6

Clean code

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -44,9 +44,6 @@ def load_data(result_path) -> pd.DataFrame:
44
  with fs.open(result_path, "r") as f:
45
  data = json.load(f)
46
  return data
47
- # model_name = data.get("model_name", "Model")
48
- # df = pd.json_normalize([data])
49
- # return df.iloc[0].rename_axis("Parameters").rename(model_name).to_frame() # .reset_index()
50
 
51
 
52
  def load_result(model_id):
@@ -60,12 +57,7 @@ def load_result(model_id):
60
  return result
61
 
62
 
63
- # def to_dataframe(data):
64
- # return pd.DataFrame.from_records([data])
65
-
66
-
67
  def to_vertical(df):
68
- # df = df.iloc[0].rename_axis("Parameters").to_frame() # .reset_index()
69
  df = df.T.rename_axis("Parameters")
70
  df.index = df.index.str.join(".")
71
  return df
 
44
  with fs.open(result_path, "r") as f:
45
  data = json.load(f)
46
  return data
 
 
 
47
 
48
 
49
  def load_result(model_id):
 
57
  return result
58
 
59
 
 
 
 
 
60
  def to_vertical(df):
 
61
  df = df.T.rename_axis("Parameters")
62
  df.index = df.index.str.join(".")
63
  return df