Helsinki University student project / Introduction to Data Science 2023
Information how to acquire new dataset can be found in the nettiauto
directory.
- Update dependencies:
$ poetry install
- Launch the application
$ poetry run flask --app src/app.py run
- API request can be directly to the server: `http://localhost:5000/
$ npm start --prefix frontend
The application can be opened in a web browser: http://localhost:3000/
All reuqest except data in JSON format and return results in JSON.
Example:
$ curl --request GET http://localhost:5000/schema
Returns the column (feature) names.
Produces the car information vector by wetching and parsing data from mobile.de. The data received from /fetch
can used be directly for the /predict
request.
$ URL_JSON = "{ 'url': 'https://mobile.de/...' }"
$ curl --request POST curl --header "Content-Type: application/json" --data $URL_JSON http://localhost:5000/predict
Example:
$ VECTOR_JSON = `cat query.json`
$ curl --request POST --header "Content-Type: application/json" --data $VECTOR_JSON http://localhost:5000/predict
Returns the predicted value. (price)
Ensure the command-line utility flyctl
is installed:
curl -L https://fly.io/install.sh | sh
When deploying the app for the first time, run
fly launch
Otherwise a new release can be deployed with
fly deploy
The deployed version can be accessed via https://import-ev-or-not.fly.dev