Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -204,7 +204,7 @@ def predict_inverse(hardness_target, ys_target, request: gr.Request):
|
|
| 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]
|
|
@@ -250,7 +250,10 @@ with gr.Blocks(css=css_styling, title=page_title) as demo:
|
|
| 250 |
with gr.Column():
|
| 251 |
with gr.Row():
|
| 252 |
gr.Markdown("### Your optimal formulation and processing conditions")
|
| 253 |
-
optimal_parameters = gr.DataFrame(label="Optimal parameters", wrap=True)
|
|
|
|
|
|
|
|
|
|
| 254 |
with gr.Row():
|
| 255 |
with gr.Column():
|
| 256 |
with gr.Row():
|
|
@@ -268,7 +271,9 @@ with gr.Blocks(css=css_styling, title=page_title) as demo:
|
|
| 268 |
fn=predict_inverse,
|
| 269 |
inputs=[input_hardness, input_yield_strength],
|
| 270 |
outputs=[
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
],
|
| 273 |
show_progress=True,
|
| 274 |
)
|
|
@@ -276,7 +281,9 @@ with gr.Blocks(css=css_styling, title=page_title) as demo:
|
|
| 276 |
lambda x: [gr.update(value=None)] * 4,
|
| 277 |
[],
|
| 278 |
[
|
| 279 |
-
|
|
|
|
|
|
|
| 280 |
input_hardness,
|
| 281 |
input_yield_strength,
|
| 282 |
],
|
|
|
|
| 204 |
'Single/Multiphase ', 'Single/Multiphase M', 'Single/Multiphase S']]
|
| 205 |
result = optimized_x
|
| 206 |
result = result[result>0.0].dropna(axis=1)
|
| 207 |
+
return list(result.keys())[2:]
|
| 208 |
|
| 209 |
|
| 210 |
example_inputs = [420, 10]
|
|
|
|
| 250 |
with gr.Column():
|
| 251 |
with gr.Row():
|
| 252 |
gr.Markdown("### Your optimal formulation and processing conditions")
|
| 253 |
+
#optimal_parameters = gr.DataFrame(label="Optimal parameters", wrap=True)
|
| 254 |
+
param1 = gr.Text(lable="Param1")
|
| 255 |
+
param2 = gr.Text(lable="Param2")
|
| 256 |
+
param3 = gr.Text(lable="Param3")
|
| 257 |
with gr.Row():
|
| 258 |
with gr.Column():
|
| 259 |
with gr.Row():
|
|
|
|
| 271 |
fn=predict_inverse,
|
| 272 |
inputs=[input_hardness, input_yield_strength],
|
| 273 |
outputs=[
|
| 274 |
+
param1,
|
| 275 |
+
param2,
|
| 276 |
+
param3,
|
| 277 |
],
|
| 278 |
show_progress=True,
|
| 279 |
)
|
|
|
|
| 281 |
lambda x: [gr.update(value=None)] * 4,
|
| 282 |
[],
|
| 283 |
[
|
| 284 |
+
param1,
|
| 285 |
+
param2,
|
| 286 |
+
param3,
|
| 287 |
input_hardness,
|
| 288 |
input_yield_strength,
|
| 289 |
],
|