Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,7 +192,6 @@ def predict_inverse(hardness_target, ys_target, request: gr.Request):
|
|
| 192 |
[el['name'] for el in domain],
|
| 193 |
[[x] for x in x_best]))
|
| 194 |
optimized_x = pd.DataFrame.from_dict(best_params)
|
| 195 |
-
plot = utils.interpret(np.asarray(optimized_x))
|
| 196 |
#for c in optimized_x.columns:
|
| 197 |
# if c in continuous_variables:
|
| 198 |
# optimized_x[c]=optimized_x[c]*(scaling_factors[c][1]-scaling_factors[c][0])+scaling_factors[c][0]
|
|
@@ -205,7 +204,7 @@ def predict_inverse(hardness_target, ys_target, request: gr.Request):
|
|
| 205 |
'Single/Multiphase ', 'Single/Multiphase M', 'Single/Multiphase S']]
|
| 206 |
result = optimized_x
|
| 207 |
result = result[result>0.0].dropna(axis=1)
|
| 208 |
-
return
|
| 209 |
|
| 210 |
|
| 211 |
example_inputs = [420, 10]
|
|
@@ -270,7 +269,6 @@ with gr.Blocks(css=css_styling, title=page_title) as demo:
|
|
| 270 |
inputs=[input_hardness, input_yield_strength],
|
| 271 |
outputs=[
|
| 272 |
optimal_parameters,
|
| 273 |
-
output_interpretation,
|
| 274 |
],
|
| 275 |
show_progress=True,
|
| 276 |
)
|
|
@@ -281,7 +279,6 @@ with gr.Blocks(css=css_styling, title=page_title) as demo:
|
|
| 281 |
optimal_parameters,
|
| 282 |
input_hardness,
|
| 283 |
input_yield_strength,
|
| 284 |
-
output_interpretation,
|
| 285 |
],
|
| 286 |
)
|
| 287 |
|
|
|
|
| 192 |
[el['name'] for el in domain],
|
| 193 |
[[x] for x in x_best]))
|
| 194 |
optimized_x = pd.DataFrame.from_dict(best_params)
|
|
|
|
| 195 |
#for c in optimized_x.columns:
|
| 196 |
# if c in continuous_variables:
|
| 197 |
# optimized_x[c]=optimized_x[c]*(scaling_factors[c][1]-scaling_factors[c][0])+scaling_factors[c][0]
|
|
|
|
| 204 |
'Single/Multiphase ', 'Single/Multiphase M', 'Single/Multiphase S']]
|
| 205 |
result = optimized_x
|
| 206 |
result = result[result>0.0].dropna(axis=1)
|
| 207 |
+
return result
|
| 208 |
|
| 209 |
|
| 210 |
example_inputs = [420, 10]
|
|
|
|
| 269 |
inputs=[input_hardness, input_yield_strength],
|
| 270 |
outputs=[
|
| 271 |
optimal_parameters,
|
|
|
|
| 272 |
],
|
| 273 |
show_progress=True,
|
| 274 |
)
|
|
|
|
| 279 |
optimal_parameters,
|
| 280 |
input_hardness,
|
| 281 |
input_yield_strength,
|
|
|
|
| 282 |
],
|
| 283 |
)
|
| 284 |
|