Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ class SingleDataset(Dataset):
|
|
88 |
# label = label.view(1,1)
|
89 |
|
90 |
return features, label
|
91 |
-
|
92 |
|
93 |
def test(use_default, csv_path, pos):
|
94 |
|
@@ -120,7 +120,7 @@ def test(use_default, csv_path, pos):
|
|
120 |
min_val, max_val = pickle.load(f)
|
121 |
|
122 |
|
123 |
-
|
124 |
test_data = pd.read_csv(csv_path)
|
125 |
max_cycle_index = test_data['Cycle_Index'].max()
|
126 |
test_data['SOH'] = test_data['cycle capacity'] / test_data['cycle capacity'].values[0]
|
|
|
88 |
# label = label.view(1,1)
|
89 |
|
90 |
return features, label
|
91 |
+
global max_cycle_index
|
92 |
|
93 |
def test(use_default, csv_path, pos):
|
94 |
|
|
|
120 |
min_val, max_val = pickle.load(f)
|
121 |
|
122 |
|
123 |
+
|
124 |
test_data = pd.read_csv(csv_path)
|
125 |
max_cycle_index = test_data['Cycle_Index'].max()
|
126 |
test_data['SOH'] = test_data['cycle capacity'] / test_data['cycle capacity'].values[0]
|