Spaces:
Running
Running
update
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def run_inference(
|
|
| 50 |
# ToDo: Add progress bar for multiple smiles
|
| 51 |
results = []
|
| 52 |
for smi in tqdm(smiles, total=len(smiles)):
|
| 53 |
-
result = {}
|
| 54 |
output = submission(
|
| 55 |
drug={"smiles": smi},
|
| 56 |
workspace_id="emulated_workspace_id",
|
|
@@ -64,7 +64,6 @@ def run_inference(
|
|
| 64 |
output.pop("IC50")
|
| 65 |
|
| 66 |
result[f"IC50_{smi}"] = output["log_micromolar_IC50"].squeeze().round(3)
|
| 67 |
-
result[f"IC50_{smi}"].shape
|
| 68 |
if confidence:
|
| 69 |
result[f"aleatoric_confidence_{smi}"] = (
|
| 70 |
output["aleatoric_confidence"].squeeze().round(3)
|
|
@@ -73,8 +72,7 @@ def run_inference(
|
|
| 73 |
output["aleatoric_confidence"].squeeze().round(3)
|
| 74 |
)
|
| 75 |
results.append(result)
|
| 76 |
-
predicted_df = pd.
|
| 77 |
-
print(predicted_df)
|
| 78 |
|
| 79 |
# Prepare DF to visualize
|
| 80 |
if omic_path is None:
|
|
|
|
| 50 |
# ToDo: Add progress bar for multiple smiles
|
| 51 |
results = []
|
| 52 |
for smi in tqdm(smiles, total=len(smiles)):
|
| 53 |
+
result = pd.DataFrame({})
|
| 54 |
output = submission(
|
| 55 |
drug={"smiles": smi},
|
| 56 |
workspace_id="emulated_workspace_id",
|
|
|
|
| 64 |
output.pop("IC50")
|
| 65 |
|
| 66 |
result[f"IC50_{smi}"] = output["log_micromolar_IC50"].squeeze().round(3)
|
|
|
|
| 67 |
if confidence:
|
| 68 |
result[f"aleatoric_confidence_{smi}"] = (
|
| 69 |
output["aleatoric_confidence"].squeeze().round(3)
|
|
|
|
| 72 |
output["aleatoric_confidence"].squeeze().round(3)
|
| 73 |
)
|
| 74 |
results.append(result)
|
| 75 |
+
predicted_df = pd.concat(results)
|
|
|
|
| 76 |
|
| 77 |
# Prepare DF to visualize
|
| 78 |
if omic_path is None:
|