Update app.py
Browse files
app.py
CHANGED
|
@@ -89,7 +89,7 @@ def predict(input_image):
|
|
| 89 |
if mol_image is None:
|
| 90 |
return "Invalid SMILES", None
|
| 91 |
|
| 92 |
-
return
|
| 93 |
|
| 94 |
except Exception as e:
|
| 95 |
return f"Error: {str(e)}", None
|
|
@@ -100,7 +100,6 @@ iface = gr.Interface(
|
|
| 100 |
outputs=[
|
| 101 |
gr.Image(label="Prediction").style(height=256),
|
| 102 |
gr.Text(label="SMILES").style(show_copy_button=True),
|
| 103 |
-
gr.Textbox(label="Molfile").style(show_copy_button=True),
|
| 104 |
],
|
| 105 |
title="OCSR",
|
| 106 |
description="Convert a molecular image into SMILES.<br> ",
|
|
|
|
| 89 |
if mol_image is None:
|
| 90 |
return "Invalid SMILES", None
|
| 91 |
|
| 92 |
+
return mol_image, smiles
|
| 93 |
|
| 94 |
except Exception as e:
|
| 95 |
return f"Error: {str(e)}", None
|
|
|
|
| 100 |
outputs=[
|
| 101 |
gr.Image(label="Prediction").style(height=256),
|
| 102 |
gr.Text(label="SMILES").style(show_copy_button=True),
|
|
|
|
| 103 |
],
|
| 104 |
title="OCSR",
|
| 105 |
description="Convert a molecular image into SMILES.<br> ",
|