Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -183,7 +183,7 @@ def predict(smiles, label):
|
|
183 |
test_dataset = MPNNDataset(input, label)
|
184 |
y_pred = tf.squeeze(model.predict(test_dataset), axis=1)
|
185 |
legends = [f"y_true/y_pred = {label[i]}/{y_pred[i]:.2f}" for i in range(len(label))]
|
186 |
-
MolsToGridImage(molecules, molsPerRow=1, legends=legends, returnPNG=False, subImgSize=(
|
187 |
return 'img.png'
|
188 |
|
189 |
inputs = [
|
@@ -208,4 +208,4 @@ gr.Interface(
|
|
208 |
examples=examples,
|
209 |
outputs="image",
|
210 |
article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>. Based on the keras example from <a href=\"https://keras.io/examples/graph/mpnn-molecular-graphs/\">Alexander Kensert</a>",
|
211 |
-
).launch(debug=
|
|
|
183 |
test_dataset = MPNNDataset(input, label)
|
184 |
y_pred = tf.squeeze(model.predict(test_dataset), axis=1)
|
185 |
legends = [f"y_true/y_pred = {label[i]}/{y_pred[i]:.2f}" for i in range(len(label))]
|
186 |
+
MolsToGridImage(molecules, molsPerRow=1, legends=legends, returnPNG=False, subImgSize=(650, 650)).save("img.png")
|
187 |
return 'img.png'
|
188 |
|
189 |
inputs = [
|
|
|
208 |
examples=examples,
|
209 |
outputs="image",
|
210 |
article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>. Based on the keras example from <a href=\"https://keras.io/examples/graph/mpnn-molecular-graphs/\">Alexander Kensert</a>",
|
211 |
+
).launch(debug=False, enable_queue=True)
|