Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -188,10 +188,11 @@ def predict_inverse(hardness_original_target, ys_original_target, metals_to_use,
|
|
188 |
result[column]/= sum_metals
|
189 |
result[column] = round(result[column], 2)
|
190 |
|
191 |
-
|
|
|
192 |
|
193 |
|
194 |
-
example_inputs = [820, 1800]
|
195 |
|
196 |
css_styling = """#submit {background: #1eccd8}
|
197 |
#submit:hover {background: #a2f1f6}
|
@@ -251,7 +252,7 @@ with gr.Blocks(css=css_styling, title=page_title, theme=osium_theme) as demo:
|
|
251 |
phase = gr.Text(label="Number of phases (S/M)")
|
252 |
|
253 |
with gr.Row():
|
254 |
-
gr.Examples([example_inputs], [input_hardness, input_yield_strength,
|
255 |
|
256 |
|
257 |
|
|
|
188 |
result[column]/= sum_metals
|
189 |
result[column] = round(result[column], 2)
|
190 |
|
191 |
+
columns = list(result.columns)
|
192 |
+
return result[columns[:-3]], result[columns[-3]], result[columns[0]], result[columns[1]], result[columns[-2]], result[columns[-1]]
|
193 |
|
194 |
|
195 |
+
example_inputs = [820, 1800, ['Al', 'Fe']]
|
196 |
|
197 |
css_styling = """#submit {background: #1eccd8}
|
198 |
#submit:hover {background: #a2f1f6}
|
|
|
252 |
phase = gr.Text(label="Number of phases (S/M)")
|
253 |
|
254 |
with gr.Row():
|
255 |
+
gr.Examples([example_inputs], [input_hardness, input_yield_strength, metal_constraints])
|
256 |
|
257 |
|
258 |
|