https://github.com/darkstarstrix/nexa_inference

A inference application to serve Scientific Models

https://github.com/darkstarstrix/nexa_inference

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords

data-science inference-engine infrastructure machine-learning notebook pdf science
Last synced: 5 months ago · JSON representation

Repository

A inference application to serve Scientific Models

Basic Info
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
data-science inference-engine infrastructure machine-learning notebook pdf science
Created 12 months ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Security

README.md

Nexa_Inference

Python 3.9+ API Status Documentation

Nexa_Inference is a unified platform for scientific machine learning, providing the newest Nexa models for predictions in biology (protein structure), astrophysics (stellar properties), and material science (material properties). Access these models via a simple REST API, with results returned in JSON format including predictions and confidence scores (0-100%).

Quick Start

Prerequisites

  • Python 3.9+
  • An API key (still in dev coming soon)
  • requests library (pip install requests)

Example: Protein Structure Prediction

Predict the secondary structure of a protein sequence: ```python import requests

response = requests.post( "https://api.Nexainference.com/v1/bio/predict", headers={"X-API-Key": "yourapi_key"}, json={"sequence": "MAKQVKL"} )

result = response.json() print(result)

Output: {"prediction": "H", "confidence": 80.56}

```

Example: Stellar Property Prediction

Estimate a star's mass: ```python response = requests.post( "https://api.Nexainference.com/v1/astro/predict", headers={"X-API-Key": "yourapi_key"}, json={ "temp": 5778, # Kelvin "luminosity": 1.0, # Solar luminosity "metallicity": 0.0 # [Fe/H] } )

result = response.json() print(f"Stellar Mass: {result['prediction']} Solar masses") print(f"Confidence: {result['confidence']}%")

Output: {"prediction": 1.0, "confidence": 97.49}

```

Example: Material Property Prediction

Predict a material's band gap: ```python response = requests.post( "https://api.Nexainference.com/v1/materials/predict", headers={"X-API-Key": "yourapi_key"}, json={"structure": "POSCAR data string"} )

result = response.json() print(f"Band Gap: {result['prediction']} eV") print(f"Confidence: {result['confidence']}%")

Output: {"prediction": 2.5, "confidence": 98.5}

```

Core Models

Biology: HelixSynth-Pro (Protein Structure Prediction)

  • Model: Variational Autoencoder (VAE) with diffusion
  • Purpose: Predicts protein secondary structures (H: Helix, E: Sheet, C: Coil)
  • Accuracy: 70.82% overall (Q3 score)
  • Latency: ~78ms
  • Details: See https://github.com/DarkStarStrix/CSE-Repo-of-Advanced-Computation-ML-and-Systems-Engineering/blob/main/Papers/ComputerScience/MachineLearning/ProteinStructurePrediction.pdf

Materials Science: Materials GNN

  • Model: Graph Neural Network (GNN)
  • Purpose: Predicts material properties (band gap, formation energy)
  • Accuracy: 98.5% on crystal structures
  • Latency: ~62ms
  • Details: See https://github.com/DarkStarStrix/CSE-Repo-of-Advanced-Computation-ML-and-Systems-Engineering/blob/main/Papers/ComputerScience/MachineLearning/MaterialScincebatteryionprediction.pdf

API Usage

The API endpoints return predictions and confidence scores in JSON format: {"prediction": value, "confidence": percentage}.

Endpoints

1. /v1/bio/predict - Protein Structure Prediction

  • Method: POST
  • Input: json { "sequence": "MAKQVKL" }
  • Output: json { "prediction": "H", "confidence": 80.56 }

3. /v1/materials/predict - Material Property Prediction

  • Method: POST
  • Input: json { "structure": "POSCAR data string" }
  • Output: json { "prediction": 2.5, "confidence": 98.5 }

Authentication

Include your API key in the request header: bash X-API-Key: your_api_key

Error Responses

  • 400 Bad Request: Invalid input format
  • 401 Unauthorized: Missing or invalid API key
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Server Error: Internal issue (contact support)

Installation (Local Development)

  1. Clone the Repository: bash git clone https://github.com/DarkStarStrix/Nexa_Inference.git cd Lambda_Zero ```

  2. Install Dependencies: bash pip install -r requirements.txt

  3. Run the API Locally: bash python app/main.py The API will be available at http://localhost:8000.

  4. Docker Deployment (Optional): bash docker-compose -f docker/docker-compose.yml up --build

Key Features

  • Fast: Average response time ~50ms
  • Accurate: >95% accuracy across domains
  • Reliable: Confidence scores with every prediction
  • Scalable: Supports millions of requests daily
  • Secure: SOC2 Type II compliant

Example Outputs

Protein Structure

json { "prediction": "H", "confidence": 80.56 }

Astrophysics

json { "prediction": "GALAXY", "confidence": 97.29 }

Materials Science

json { "prediction": 2.5, "confidence": 98.5 }

Use Cases

  • Biology: Protein design, drug discovery
  • Astrophysics: Stellar classification, exoplanet research
  • Materials Science: Material discovery, energy applications

Resources

Enterprise Support

For custom models, on-premise deployment, or integration help, email: allanw.mk@gmail.com.

License

Commercial license - see LICENSE

Owner

  • Name: Allan Murimi Wandia
  • Login: DarkStarStrix
  • Kind: user
  • Location: U.S.A
  • Company: Freelance

Full stack Dev Turning ideas into projects

GitHub Events

Total
  • Push event: 2
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 1
  • Create event: 1
Last Year
  • Push event: 2
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 1
  • Create event: 1