NexaDrug: AI-powered Drug Discovery Assistance
This repository contains a machine learning model designed to predict molecular properties like molecular weight and polar surface area from chemical compound data.
π¦ Files
| File Name | Description |
|---|---|
drug_model.py |
Python script to train and use the model |
drug_prediction_model.pt |
Trained PyTorch model file |
scaler.pkl |
StandardScaler used for input preprocessing |
π How to Use
import torch
import joblib
import pandas as pd
from model import DrugPredictionModel # Your PyTorch model class
# Load scaler
scaler = joblib.load("scaler.pkl")
# Load model
model = DrugPredictionModel(input_size=11, output_size=2)
model.load_state_dict(torch.load("drug_prediction_model.pt"))
model.eval()
# Prepare new input
new_data = pd.DataFrame({...}) # input feature values
new_data_scaled = scaler.transform(new_data)
# Convert to tensor and predict
input_tensor = torch.tensor(new_data_scaled, dtype=torch.float32)
pred = model(input_tensor).detach().numpy()
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support