An open API service indexing awesome lists of open source software.

https://github.com/rggh/api-3

html, javascript, FastAPI, REST API, Python
https://github.com/rggh/api-3

fastapi js ml oneliners python rest-api sklearn

Last synced: 6 months ago
JSON representation

html, javascript, FastAPI, REST API, Python

Awesome Lists containing this project

README

          

# API-3
### html, javascript, FastAPI

#remember to add code in fastapi to allow CORS

import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from sklearn.neural_network import MLPRegressor
import numpy as np

app = FastAPI()

output = {}

origins = [
"http://redandgreen.co.uk"
]

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

---

https://www.stackhawk.com/blog/configuring-cors-in-fastapi/

---

Try the code here : http://redandgreen.co.uk/indexx.html

---