Skip to content

Bento ML classifier batch inference with csv file input #1224

Answered by bojiang
ElisaPiccin asked this question in Q&A
Discussion options

You must be logged in to vote

curl -i --header "Content-Type: text/csv" --request POST --data iris_5.csv localhost:5000/predict
curl -i --header "Content-Type: text/csv" --request POST --data-binary @iris_5.csv localhost:5000/predict

See the doc: https://docs.bentoml.org/en/latest/api/adapters.html#dataframeinput

curl -i \
  --header "Content-Type: text/csv" \
  --request POST \
  --data-binary @file.csv \
  localhost:5000/predict

By the former command, the data of HTTP request would be a string "iris_5.csv” rather than content of the file.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ElisaPiccin
Comment options

@cryanzpj
Comment options

@bojiang
Comment options

@cryanzpj
Comment options

@ElisaPiccin
Comment options

Answer selected by bojiang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants