Sitemap
Artificial Intelligence in Plain English

New AI, ML and Data Science articles every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Efficient Text Classification

4 min readSep 19, 2024

--

Photo by Ferdinand Stöhr on Unsplash

Introduction

[
[
{
"label": "Spanish",
"score": 0.7295899391174316
}
]
]

FastAPI

The FastAPI SwaggerUI for the GLiClass service, image by the author
curl -X 'POST' \
'http://localhost:8080/predict' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"inputs": [
"Hablo español, ¿cuánto cuesta el vino tinto?"
],
"labels": [
"English",
"Spanish",
"French",
"German",
"Italian",
"Portuguese",
"Russian",
"Turkish",
"Vietnamese"
],
"classification_type": "single-label"
}'
{
"task_id": "7869541c-ccc0-48df-b0fd-6218d0329eea",
"status": "Processing"
}
curl -X 'GET' \
'http://localhost:8080/result/7869541c-ccc0-48df-b0fd-6218d0329eea' \
-H 'accept: application/json'
[
[
{
"label": "Spanish",
"score": 0.7295899391174316
}
]
]

Celery/Flower

View of the Flower task manager, image by the author

Locust

Locust load testing UI, image by the author

Streamlit

Streamlit UI, image by the author

Conclusion

References

In Plain English 🚀

--

--

Artificial Intelligence in Plain English
Artificial Intelligence in Plain English

Published in Artificial Intelligence in Plain English

New AI, ML and Data Science articles every day. Follow to join our 3.5M+ monthly readers.

Henrik Albihn, MS
Henrik Albihn, MS

Written by Henrik Albihn, MS

🚀 AI Scientist | Writer @ AI in Plain English, Level Up Coding, AI Advances | Founder @ Theta Labs, SQLGenie, QuickerChat, ML Academy

No responses yet