Sonja Topf commited on
Commit
e58a46c
·
2 Parent(s): 25fddff b18fc85

Merge branch 'main' of https://huggingface.co/spaces/ml-jku/tox21_gin_classifier

Browse files
Files changed (2) hide show
  1. README.md +5 -2
  2. app.py +2 -3
README.md CHANGED
@@ -9,11 +9,14 @@ license: cc-by-nc-4.0
9
  short_description: Graph Isomorphism Network Baseline Classifier for Tox21
10
  ---
11
 
12
- # Tox21 Graph Isomorphism Network Classifier
13
 
14
  This repository hosts a Hugging Face Space that provides an examplary API for submitting models to the [Tox21 Leaderboard](https://huggingface.co/spaces/ml-jku/tox21_leaderboard).
15
 
16
- In this example, we trained a GIN classifier on the Tox21 targets and saved the trained model in the `checkpoints/` folder.
 
 
 
17
 
18
  **Important:** For leaderboard submission, your Space needs to include training code. The file `train.py` should train the model using the config specified inside the `config/` folder and save the final model parameters into a file inside the `checkpoints/` folder. The model should be trained using the [Tox21_dataset](https://huggingface.co/datasets/ml-jku/tox21) provided on Hugging Face. The datasets can be loaded like this:
19
  ```python
 
9
  short_description: Graph Isomorphism Network Baseline Classifier for Tox21
10
  ---
11
 
12
+ # Tox21 Graph Isomorphism Network (GIN) Classifier
13
 
14
  This repository hosts a Hugging Face Space that provides an examplary API for submitting models to the [Tox21 Leaderboard](https://huggingface.co/spaces/ml-jku/tox21_leaderboard).
15
 
16
+ Here a [Graph Isomorphism Network(GIN)](https://arxiv.org/abs/1810.00826) is trained on the Tox21 dataset, and the trained models are provided for
17
+ inference. Model input is a SMILES string of the small molecule, and the output are 12 numeric values for
18
+ each of the toxic effects of the Tox21 dataset.
19
+
20
 
21
  **Important:** For leaderboard submission, your Space needs to include training code. The file `train.py` should train the model using the config specified inside the `config/` folder and save the final model parameters into a file inside the `checkpoints/` folder. The model should be trained using the [Tox21_dataset](https://huggingface.co/datasets/ml-jku/tox21) provided on Hugging Face. The datasets can be loaded like this:
22
  ```python
app.py CHANGED
@@ -37,7 +37,7 @@ def root():
37
  "/healthz": "GET - Health check",
38
  "/predict": "POST - Predict toxicity for SMILES",
39
  },
40
- "usage": "Send POST to /predict with {'smiles': ['your_smiles_here']} and Authorization header",
41
  }
42
 
43
 
@@ -46,7 +46,6 @@ def metadata():
46
  return {
47
  "name": "Tox21 GIN Classifier",
48
  "version": "0.1.0",
49
- "max_batch_size": 256,
50
  "tox_endpoints": [
51
  "NR-AR",
52
  "NR-AR-LBD",
@@ -74,5 +73,5 @@ def predict(request: Request):
74
  predictions = predict_func(request.smiles)
75
  return {
76
  "predictions": predictions,
77
- "model_info": {"name": "Tox21 GIN Classifier", "version": "0.1.0"},
78
  }
 
37
  "/healthz": "GET - Health check",
38
  "/predict": "POST - Predict toxicity for SMILES",
39
  },
40
+ "usage": "Send POST to /predict with {'smiles': ['your_smiles_here']}",
41
  }
42
 
43
 
 
46
  return {
47
  "name": "Tox21 GIN Classifier",
48
  "version": "0.1.0",
 
49
  "tox_endpoints": [
50
  "NR-AR",
51
  "NR-AR-LBD",
 
73
  predictions = predict_func(request.smiles)
74
  return {
75
  "predictions": predictions,
76
+ "model_info": {"name": "Tox21 GIN classifier", "version": "0.1.0"},
77
  }