Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -135,8 +135,10 @@ def predict_from_tuple(in1, in2, in3, in4, in5, request: gr.Request):
|
|
135 |
print("One hot columns are ", one_hot.columns)
|
136 |
return predict(one_hot, request)
|
137 |
|
|
|
|
|
138 |
|
139 |
-
def fit_outputs(x
|
140 |
predictions = predict(x)
|
141 |
error_hardness = np.sqrt(np.square(predictions[0]-hardness_target))
|
142 |
error_ys = np.sqrt(np.square(predictions[2]-ys_target))
|
@@ -144,7 +146,7 @@ def fit_outputs(x, hardness_target, ys_target):
|
|
144 |
return error_hardness + error_ys
|
145 |
|
146 |
|
147 |
-
def predict_inverse(
|
148 |
|
149 |
continuous_variables = ['PROPERTY: Calculated Density (g/cm$^3$)',
|
150 |
'PROPERTY: Calculated Young modulus (GPa)']
|
|
|
135 |
print("One hot columns are ", one_hot.columns)
|
136 |
return predict(one_hot, request)
|
137 |
|
138 |
+
hardness_target = 1
|
139 |
+
ys_target = 2
|
140 |
|
141 |
+
def fit_outputs(x):
|
142 |
predictions = predict(x)
|
143 |
error_hardness = np.sqrt(np.square(predictions[0]-hardness_target))
|
144 |
error_ys = np.sqrt(np.square(predictions[2]-ys_target))
|
|
|
146 |
return error_hardness + error_ys
|
147 |
|
148 |
|
149 |
+
def predict_inverse(one_hot, request: gr.Request):
|
150 |
|
151 |
continuous_variables = ['PROPERTY: Calculated Density (g/cm$^3$)',
|
152 |
'PROPERTY: Calculated Young modulus (GPa)']
|