Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def predict_inverse(hardness_original_target, ys_original_target, metals_to_use,
|
|
139 |
for c in one_hot_columns:
|
140 |
if c in continuous_variables:
|
141 |
if c.startswith("PROPERTY: Metal") and c not in metals_to_use:
|
142 |
-
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0
|
143 |
else:
|
144 |
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0., 1.)})#(0.,1.)})
|
145 |
else:
|
@@ -189,8 +189,12 @@ def predict_inverse(hardness_original_target, ys_original_target, metals_to_use,
|
|
189 |
result[column] = round(result[column], 2)
|
190 |
|
191 |
columns = list(result.columns)
|
|
|
|
|
|
|
|
|
192 |
return (result[columns[2:-3]], columns[-3], result.at[0, columns[0]],
|
193 |
-
result.at[0, columns[1]],
|
194 |
|
195 |
|
196 |
example_inputs = [820, 1800, ['Al', 'Fe', 'Ni']]
|
|
|
139 |
for c in one_hot_columns:
|
140 |
if c in continuous_variables:
|
141 |
if c.startswith("PROPERTY: Metal") and c not in metals_to_use:
|
142 |
+
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0.01, 0.)})
|
143 |
else:
|
144 |
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0., 1.)})#(0.,1.)})
|
145 |
else:
|
|
|
189 |
result[column] = round(result[column], 2)
|
190 |
|
191 |
columns = list(result.columns)
|
192 |
+
optimal_processing = columns[-2]
|
193 |
+
if optimal_processing == 'OTHER':
|
194 |
+
return 'CAST'
|
195 |
+
|
196 |
return (result[columns[2:-3]], columns[-3], result.at[0, columns[0]],
|
197 |
+
result.at[0, columns[1]], optimal_processing, columns[-1])
|
198 |
|
199 |
|
200 |
example_inputs = [820, 1800, ['Al', 'Fe', 'Ni']]
|