Spaces:
Sleeping
Sleeping
File size: 496 Bytes
b5b4a38 a4aa491 b5b4a38 eec3b88 59ae052 dfd3544 b5b4a38 eec3b88 b5b4a38 59ae052 b5b4a38 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
package main
import (
"github.com/Jensen-holm/ml-from-scratch/nn"
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
// eventually we might want to add a key to this endpoint
// that we will be able to validate.
app.Post("/neural-network", func(c *fiber.Ctx) error {
nn, err := nn.NewNN(c)
if err != nil {
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"error": err,
})
}
nn.Train()
return c.SendString("No error")
})
app.Listen(":3000")
}
|