Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -359,6 +359,11 @@ TASK_MAP = {
|
|
| 359 |
'Compound-protein binding affinity': 'DTA',
|
| 360 |
}
|
| 361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
PRESET_MAP = {
|
| 363 |
'DeepDTA': 'deep_dta',
|
| 364 |
'DeepConvDTI': 'deep_conv_dti',
|
|
@@ -437,6 +442,8 @@ def submit_predict(predict_filepath, task, preset, target_family, flag, state, p
|
|
| 437 |
job_id = flag
|
| 438 |
global COLUMN_ALIASES
|
| 439 |
task = TASK_MAP[task]
|
|
|
|
|
|
|
| 440 |
preset = PRESET_MAP[preset]
|
| 441 |
target_family = TARGET_FAMILY_MAP[target_family]
|
| 442 |
# email_hash = hashlib.sha256(email.encode()).hexdigest()
|
|
|
|
| 359 |
'Compound-protein binding affinity': 'DTA',
|
| 360 |
}
|
| 361 |
|
| 362 |
+
TASK_METRIC_MAP = {
|
| 363 |
+
'DTI': 'AUROC',
|
| 364 |
+
'DTA': 'CI',
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
PRESET_MAP = {
|
| 368 |
'DeepDTA': 'deep_dta',
|
| 369 |
'DeepConvDTI': 'deep_conv_dti',
|
|
|
|
| 442 |
job_id = flag
|
| 443 |
global COLUMN_ALIASES
|
| 444 |
task = TASK_MAP[task]
|
| 445 |
+
if not preset:
|
| 446 |
+
raise gr.Error('Please select a model.')
|
| 447 |
preset = PRESET_MAP[preset]
|
| 448 |
target_family = TARGET_FAMILY_MAP[target_family]
|
| 449 |
# email_hash = hashlib.sha256(email.encode()).hexdigest()
|