Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -272,51 +272,51 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
|
|
272 |
gr.Markdown("### Interpretation of yield strength prediction")
|
273 |
with gr.Row():
|
274 |
output_interpretation = gr.Plot(label="Interpretation")
|
275 |
-
|
276 |
-
elem1 = "%Cr"
|
277 |
-
elem2 = "%V"
|
278 |
-
elem3 = "%Mo"
|
279 |
-
with gr.Row():
|
280 |
-
input_cols_gradio = ["%C", "%Co", "%Cr", "%V", "%Mo", "%W", "Temperature_C"]
|
281 |
-
input_list1 = input_cols_gradio.copy()
|
282 |
-
input_list1.remove(elem2)
|
283 |
-
input_list1.remove(elem3)
|
284 |
-
dropdown_1 = gr.Dropdown(label="Fix element 1", choices=input_list1, value=elem1)
|
285 |
-
input_slicer_1 = gr.Slider(
|
286 |
-
label=elem1,
|
287 |
-
minimum=space_dict[elem1]["min"],
|
288 |
-
maximum=space_dict[elem1]["max"],
|
289 |
-
value=space_dict[elem1]["value"],
|
290 |
-
step=space_dict[elem1]["step_display"],
|
291 |
-
)
|
292 |
-
with gr.Row():
|
293 |
-
input_list2 = input_cols_gradio.copy()
|
294 |
-
input_list2.remove(elem1)
|
295 |
-
input_list2.remove(elem3)
|
296 |
-
dropdown_2 = gr.Dropdown(label="Fix element 2", choices=input_list2, value=elem2)
|
297 |
-
input_slicer_2 = gr.Slider(
|
298 |
-
label=elem2,
|
299 |
-
minimum=space_dict[elem2]["min"],
|
300 |
-
maximum=space_dict[elem2]["max"],
|
301 |
-
value=space_dict[elem2]["value"],
|
302 |
-
step=space_dict[elem2]["step_display"],
|
303 |
-
)
|
304 |
with gr.Row():
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
|
321 |
with gr.Row():
|
322 |
gr.Examples([example_inputs], [input_formula, input_phase, input_bccfcc, input_processing, input_microstructure])
|
|
|
272 |
gr.Markdown("### Interpretation of yield strength prediction")
|
273 |
with gr.Row():
|
274 |
output_interpretation = gr.Plot(label="Interpretation")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
with gr.Row():
|
276 |
+
elem1 = "%Cr"
|
277 |
+
elem2 = "%V"
|
278 |
+
elem3 = "%Mo"
|
279 |
+
with gr.Row():
|
280 |
+
input_cols_gradio = ["%C", "%Co", "%Cr", "%V", "%Mo", "%W", "Temperature_C"]
|
281 |
+
input_list1 = input_cols_gradio.copy()
|
282 |
+
input_list1.remove(elem2)
|
283 |
+
input_list1.remove(elem3)
|
284 |
+
dropdown_1 = gr.Dropdown(label="Fix element 1", choices=input_list1, value=elem1)
|
285 |
+
input_slicer_1 = gr.Slider(
|
286 |
+
label=elem1,
|
287 |
+
minimum=space_dict[elem1]["min"],
|
288 |
+
maximum=space_dict[elem1]["max"],
|
289 |
+
value=space_dict[elem1]["value"],
|
290 |
+
step=space_dict[elem1]["step_display"],
|
291 |
+
)
|
292 |
+
with gr.Row():
|
293 |
+
input_list2 = input_cols_gradio.copy()
|
294 |
+
input_list2.remove(elem1)
|
295 |
+
input_list2.remove(elem3)
|
296 |
+
dropdown_2 = gr.Dropdown(label="Fix element 2", choices=input_list2, value=elem2)
|
297 |
+
input_slicer_2 = gr.Slider(
|
298 |
+
label=elem2,
|
299 |
+
minimum=space_dict[elem2]["min"],
|
300 |
+
maximum=space_dict[elem2]["max"],
|
301 |
+
value=space_dict[elem2]["value"],
|
302 |
+
step=space_dict[elem2]["step_display"],
|
303 |
+
)
|
304 |
+
with gr.Row():
|
305 |
+
input_list3 = input_cols_gradio.copy()
|
306 |
+
input_list3.remove(elem1)
|
307 |
+
input_list3.remove(elem2)
|
308 |
+
dropdown_3 = gr.Dropdown(label="Fix element 3", choices=input_list3, value=elem3)
|
309 |
+
input_slicer_3 = gr.Slider(
|
310 |
+
label=elem3,
|
311 |
+
minimum=space_dict[elem3]["min"],
|
312 |
+
maximum=space_dict[elem3]["max"],
|
313 |
+
value=space_dict[elem3]["value"],
|
314 |
+
step=space_dict[elem3]["step_display"],
|
315 |
+
)
|
316 |
+
|
317 |
+
with gr.Column():
|
318 |
+
gr.Markdown("### Your design space")
|
319 |
+
output_plot = gr.Plot(type="plotly")
|
320 |
|
321 |
with gr.Row():
|
322 |
gr.Examples([example_inputs], [input_formula, input_phase, input_bccfcc, input_processing, input_microstructure])
|