Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -360,19 +360,18 @@ def predict_inverse(antimicrobial_activity_target, substrate, microorganism, num
|
|
360 |
df_columns.remove(column)
|
361 |
constrained_columns = ['Substrate', 'Washing_cycles', 'Microorganism ']
|
362 |
for c in test_data_columns:
|
363 |
-
if c
|
364 |
-
if c
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
if c ==
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
domain.append({'name': str(c), 'type': 'categorical', 'domain': (int(num_washing_cycles), int(num_washing_cycles))})
|
376 |
else:
|
377 |
if c in numerical_columns:
|
378 |
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0.,1.)})
|
|
|
360 |
df_columns.remove(column)
|
361 |
constrained_columns = ['Substrate', 'Washing_cycles', 'Microorganism ']
|
362 |
for c in test_data_columns:
|
363 |
+
if c.startswith('Substrate'):
|
364 |
+
if c == substrate:
|
365 |
+
domain.append({'name': str(c), 'type': 'categorical', 'domain': (1.0, 1.0)})
|
366 |
+
else:
|
367 |
+
domain.append({'name': str(c), 'type': 'categorical', 'domain': (0.0, 0.0)})
|
368 |
+
elif c == 'Microorganism ':
|
369 |
+
if c == microorganism:
|
370 |
+
domain.append({'name': str(c), 'type': 'categorical', 'domain': (1.0, 1.0)})
|
371 |
+
else:
|
372 |
+
domain.append({'name': str(c), 'type': 'categorical', 'domain': (0.0, 0.0)})
|
373 |
+
elif c == 'Washing_cycles':
|
374 |
+
domain.append({'name': str(c), 'type': 'categorical', 'domain': (int(num_washing_cycles), int(num_washing_cycles))})
|
|
|
375 |
else:
|
376 |
if c in numerical_columns:
|
377 |
domain.append({'name': str(c), 'type': 'continuous', 'domain': (0.,1.)})
|