Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,7 +140,8 @@ def fit_outputs_constraints(x, hardness_target, ys_target, request: gr.Request):
|
|
| 140 |
predictions = predict(x, request)
|
| 141 |
error_hardness = np.sqrt(np.square(predictions[0]-float(hardness_target)))
|
| 142 |
error_ys = np.sqrt(np.square(predictions[2]-float(ys_target)))
|
| 143 |
-
print(predictions, float(hardness_target), float(ys_target),
|
|
|
|
| 144 |
return error_hardness + error_ys
|
| 145 |
|
| 146 |
def predict_inverse(hardness_target, ys_target, request: gr.Request):
|
|
|
|
| 140 |
predictions = predict(x, request)
|
| 141 |
error_hardness = np.sqrt(np.square(predictions[0]-float(hardness_target)))
|
| 142 |
error_ys = np.sqrt(np.square(predictions[2]-float(ys_target)))
|
| 143 |
+
print("Optimization step is ", predictions, float(hardness_target), float(ys_target),
|
| 144 |
+
error_hardness, error_ys)
|
| 145 |
return error_hardness + error_ys
|
| 146 |
|
| 147 |
def predict_inverse(hardness_target, ys_target, request: gr.Request):
|