Zekun Wu commited on
Commit
8e01763
·
1 Parent(s): c9cdcc3
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def calculate_flops_hf(model_name, input_shape, access_token, bp_factor, output_
41
  data, return_print = calculate_flops_in_hugging_space(model_name=model_name, empty_model=model,
42
  access_token=access_token, input_shape=input_shape,
43
  bp_factor=bp_factor, output_unit=output_unit)
44
- df = pd.DataFrame(data)
45
  total_flops = df['Forward+Backward FLOPs'][0] * 10 ** 9 # Convert GFLOPs to FLOPs
46
  threshold_flops = 10 ** 25
47
  meets_criteria = total_flops > threshold_flops
 
41
  data, return_print = calculate_flops_in_hugging_space(model_name=model_name, empty_model=model,
42
  access_token=access_token, input_shape=input_shape,
43
  bp_factor=bp_factor, output_unit=output_unit)
44
+ df = data['value']
45
  total_flops = df['Forward+Backward FLOPs'][0] * 10 ** 9 # Convert GFLOPs to FLOPs
46
  threshold_flops = 10 ** 25
47
  meets_criteria = total_flops > threshold_flops