snajmark commited on
Commit
71e7ce5
·
1 Parent(s): c2d1159

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- return result[:-3], result[-3], result[0], result[1], result[-2], result[-1]
 
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, ['Al', 'Fe']])
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