snajmark commited on
Commit
39aaa4f
·
1 Parent(s): f950a89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -375,8 +375,10 @@ def predict_inverse(antimicrobial_activity_target, substrate, microorganism, num
375
  domain.append({'name': str(one_hot_column), 'type': 'categorical', 'domain': (1.0, 1.0)})
376
  else:
377
  domain.append({'name': str(one_hot_column), 'type': 'categorical', 'domain': (0.0, 0.0)})
378
- #elif df_column == 'Washing_cycles':
379
- # domain.append({'name': str(df_column), 'type': 'categorical', 'domain': (int(num_washing_cycles), int(num_washing_cycles))})
 
 
380
  elif df_column in numerical_columns:
381
  domain.append({'name': str(df_column), 'type': 'continuous', 'domain': (0.,1.)})
382
  else:
 
375
  domain.append({'name': str(one_hot_column), 'type': 'categorical', 'domain': (1.0, 1.0)})
376
  else:
377
  domain.append({'name': str(one_hot_column), 'type': 'categorical', 'domain': (0.0, 0.0)})
378
+ elif df_column == 'Washing_cycles':
379
+ washing_cycles_target_df = pd.DataFrame({'Washing_cycles':[reduction_target]})
380
+ washing_cycles_target_df = scale_numerical(reduction_target_df, ['Washing_cycles'], scaler=minmax_scaler_targets, fit=False)
381
+ domain.append({'name': str(df_column), 'type': 'continuous', 'domain': (washing_cycles_target_df, washing_cycles_target_df)})
382
  elif df_column in numerical_columns:
383
  domain.append({'name': str(df_column), 'type': 'continuous', 'domain': (0.,1.)})
384
  else: