muellerzr HF staff commited on
Commit
a71eaa0
1 Parent(s): 5c10d4e

Some more fixes

Browse files
Files changed (1) hide show
  1. src/app.py +9 -8
src/app.py CHANGED
@@ -33,7 +33,7 @@ def get_results(model_name: str, library: str, options: list, access_token: str)
33
  )
34
  for i, dtype in enumerate(options):
35
  if stages["model"][i] != -1:
36
- memory_values.loc[len(memory_values)] = [
37
  dtype,
38
  convert_bytes(stages["model"][i]),
39
  convert_bytes(stages["gradients"][i]),
@@ -47,13 +47,14 @@ def get_results(model_name: str, library: str, options: list, access_token: str)
47
  gr.update(visible=True, value=memory_values),
48
  gr.update(visible=not has_discussion),
49
  ]
50
- return [
51
- title,
52
- gr.update(visible=True, value=pd.DataFrame(data)),
53
- gr.update(visible=False, value=""),
54
- gr.update(visible=False, value=pd.DataFrame()),
55
- gr.update(visible=not has_discussion),
56
- ]
 
57
 
58
 
59
  with gr.Blocks() as demo:
 
33
  )
34
  for i, dtype in enumerate(options):
35
  if stages["model"][i] != -1:
36
+ memory_values.loc[len(memory_values.index)] = [
37
  dtype,
38
  convert_bytes(stages["model"][i]),
39
  convert_bytes(stages["gradients"][i]),
 
47
  gr.update(visible=True, value=memory_values),
48
  gr.update(visible=not has_discussion),
49
  ]
50
+ else:
51
+ return [
52
+ title,
53
+ gr.update(visible=True, value=pd.DataFrame(data)),
54
+ gr.update(visible=False, value=""),
55
+ gr.update(visible=False, value=pd.DataFrame()),
56
+ gr.update(visible=not has_discussion),
57
+ ]
58
 
59
 
60
  with gr.Blocks() as demo: