Skip to content

Commit

Permalink
Create astroinformatics.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 22, 2024
1 parent 87812af commit 85efe8f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions routes/astroinformatics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import express from 'express';
import * as Astropy from 'astropy';

const router = express.Router();
const astropy = new Astropy.Astropy();

router.post('/astronomical-object-detection', async (req, res) => {
const { image } = req.body;
const detections = await astropy.detect(image);
res.json({ detections });
});

router.post('/astronomical-object-characterization', async (req, res) => {
const { object } = req.body;
const characterization = await astropy.characterize(object);
res.json({ characterization });
});

router.post('/astronomical-event-prediction', async (req, res) => {
const { data } = req.body;
const prediction = await astropy.predict(data);
res.json({ prediction });
});

export default router;

0 comments on commit 85efe8f

Please sign in to comment.