MooseML commited on
Commit
5331c58
·
1 Parent(s): 4992f1b

Improved Instructions

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -13,7 +13,7 @@ from model import load_model
13
  from utils import smiles_to_data
14
 
15
  # Config
16
- DEVICE, RDKIT_DIM, MODEL_PATH, MAX_DISPLAY = "cpu", 6, "best_hybridgnn.pt", 10
17
 
18
  # Model & DB (cached)
19
  @st.cache_resource
@@ -53,11 +53,11 @@ st.markdown("""
53
  This app predicts the HOMO-LUMO energy gap for molecules using a trained Graph Neural Network (GNN).
54
 
55
  **Instructions:**
56
- - Enter a **single SMILES** string or **comma-separated list** in the box below.
57
  - Or **upload a CSV file** containing a single column of SMILES strings.
58
  - **Note**: If you've uploaded a CSV and want to switch to typing SMILES, please click the "X" next to the uploaded file to clear it.
59
- - SMILES format should look like: `CC(=O)Oc1ccccc1C(=O)O` (for aspirin).
60
- - The app will display predictions and molecule images (up to 10 shown at once).
61
  """)
62
 
63
  # File uploader (outside form)
@@ -110,7 +110,7 @@ if smiles_list:
110
  st.subheader(f"Results (first {MAX_DISPLAY})")
111
  for i, (smi, pred) in enumerate(zip(vsmi, preds)):
112
  if i >= MAX_DISPLAY:
113
- st.info("…truncated")
114
  break
115
  mol = Chem.MolFromSmiles(smi)
116
  if mol:
 
13
  from utils import smiles_to_data
14
 
15
  # Config
16
+ DEVICE, RDKIT_DIM, MODEL_PATH, MAX_DISPLAY = "cpu", 6, "best_hybridgnn.pt", 20
17
 
18
  # Model & DB (cached)
19
  @st.cache_resource
 
53
  This app predicts the HOMO-LUMO energy gap for molecules using a trained Graph Neural Network (GNN).
54
 
55
  **Instructions:**
56
+ - Enter a **single SMILES** string or **comma/newline separated list** in the box below.
57
  - Or **upload a CSV file** containing a single column of SMILES strings.
58
  - **Note**: If you've uploaded a CSV and want to switch to typing SMILES, please click the "X" next to the uploaded file to clear it.
59
+ - SMILES format should look like: `O=C(C)Oc1ccccc1C(=O)O` (for aspirin).
60
+ - The app will display predictions and molecule images (up to 20 shown at once).
61
  """)
62
 
63
  # File uploader (outside form)
 
110
  st.subheader(f"Results (first {MAX_DISPLAY})")
111
  for i, (smi, pred) in enumerate(zip(vsmi, preds)):
112
  if i >= MAX_DISPLAY:
113
+ st.info("...Only Displaying 20 Compounds")
114
  break
115
  mol = Chem.MolFromSmiles(smi)
116
  if mol: