Spaces:
Running
Running
Update prediction.py
Browse files- prediction.py +12 -1
prediction.py
CHANGED
@@ -114,4 +114,15 @@ def predict_properties(smiles: str):
|
|
114 |
return results
|
115 |
|
116 |
except Exception as e:
|
117 |
-
return {"error": str(e)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
return results
|
115 |
|
116 |
except Exception as e:
|
117 |
+
return {"error": str(e)}
|
118 |
+
|
119 |
+
# Show function to print the results
|
120 |
+
def show(smiles: str):
|
121 |
+
result = predict_properties(smiles)
|
122 |
+
|
123 |
+
if "error" in result:
|
124 |
+
print(f"Error: {result['error']}")
|
125 |
+
else:
|
126 |
+
print("Predicted Properties for SMILES:", smiles)
|
127 |
+
for key, value in result.items():
|
128 |
+
print(f"{key}: {value}")
|