{"id":12678,"date":"2023-11-15T09:29:22","date_gmt":"2023-11-15T08:29:22","guid":{"rendered":"https:\/\/flaven.fr\/?p=12678"},"modified":"2026-09-16T10:08:28","modified_gmt":"2026-09-16T08:08:28","slug":"crafting-fluent-translation-api-a-quick-journey-into-text-translation-with-nllb-huggingface-and-fastapi-plus-a-small-dive-into-roberta-masked-language-modeling-with-gradio","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2023\/11\/crafting-fluent-translation-api-a-quick-journey-into-text-translation-with-nllb-huggingface-and-fastapi-plus-a-small-dive-into-roberta-masked-language-modeling-with-gradio\/","title":{"rendered":"Crafting Fluent Translation API: A quick Journey into Text Translation with NLLB, HuggingFace, and FastAPI, Plus a small Dive into Roberta Masked Language Modeling with Gradio"},"content":{"rendered":"<p>I have already mentioned many times on this blog the obstacles linked to managing a multilingual digital product. Indeed, whether you are creating a mobile application, a site or even a CMS, multilingualism increases the complexity somewhat. For AI, inevitably, the question arises with even more strength. For instance, whatever the language is, how is possible to ensure the same quality for functionalities in NLP (NER, Keywords extraction, summarization, etc.) or for audio extraction&#8230; etc. and so, what is the best strategy to adopt to overcome this obstacle?<\/p>\n<p><b>For this post, you can find all files for each project on my GitHub account. See <a href=\"https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio<\/a><\/b><\/p>\n<p><b>Looking for the miracle translation tool to tackle the subject of multilingualism. The post was of course also an opportunity to discover the inexhaustible resources of the HuggingFace site as well as the possibility of using Gradio to dress up my AI productions as Streamlit does. <\/b><\/p>\n<p><i>A little clarification on languages, I am really looking for an LLM able to translate a wide variety of languages. I need to get rid of my Eurocentrism and include in my quest a fair number of different languages such as African languages: Hausa, Kiswahili, Mandenkan, Fulfulde, Wolof and of course Asian languages such as Chinese, Khmer or Vietnamese, Slavic languages such as Russian, Ukrainian and of course Persian, Arabic or finally Romanian. In short, a real babelian sample!<\/i><\/p>\n<p>As such, Meta became aware of the under-representation of African linguistic groups for its &#8220;no-language-left-behind&#8221; library. As such, Meta is therefore launching a call to document certain African languages. So if you speak the Congo, Kinyarwanda or Swazi languages, join the band wagon.<\/p>\n<p><i>Source: <a href=\"https:\/\/ai.meta.com\/research\/request-for-proposals\/translation-support-for-african-languages\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ai.meta.com\/research\/request-for-proposals\/translation-support-for-african-languages\/<\/a><\/i><\/p>\n<p><i>Source: <a href=\"https:\/\/ai.meta.com\/research\/no-language-left-behind\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ai.meta.com\/research\/no-language-left-behind\/<\/a><\/i><\/p>\n<p><i>Source: <a href=\"https:\/\/ai.meta.com\/blog\/nllb-200-high-quality-machine-translation\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ai.meta.com\/blog\/nllb-200-high-quality-machine-translation\/<\/a><\/i><\/p>\n<h2>Few words on Masked Language Modeling<\/h2>\n<p>An interesting essay on Masked Language Modeling so here is a definition taken from the Keras site.<\/p>\n<blockquote><p>Masked Language Modeling is a fill-in-the-blank task, where a model uses the context words surrounding a mask token to try to predict what the masked word should be.<\/p>\n<p>For an input that contains one or more mask tokens, the model will generate the most likely substitution for each.<\/p>\n<p>Example:<\/p>\n<p>Input: &#8220;I have watched this [MASK] and it was awesome.&#8221;<br \/>\nOutput: &#8220;I have watched this movie and it was awesome.&#8221;\n<\/p><\/blockquote>\n<p>Like any beginner in IA, during the few tests on Masked Language Modeling with Roberta, I have experimented stranger things! Sometimes, the result is a bit little confusing. Especially, once again when the &#8220;system&#8221; has to guess a word in a context that is more &#8220;African&#8221; than &#8220;American&#8221; I should say! Without being a specialist on the issue, I use this example as an illustration of cognitive bias, which is also very much linked to cultural domination.<\/p>\n<p>Indeed, for sure, Roberta guesses the capital of Oregon but misses that of Uganda due to lack of appropriate training.<\/p>\n<pre>\r\n[MASK] is the capital of Oregon.\r\n# For sure, everybody knows that the correct answer is \"Portland\" and the probability to have \"Portland\" as a proposition is close to one!\r\n# Portland 94%\r\n# This 2%\r\n# Washington 1%\r\n# Seattle 1%\r\n# It 0%\r\n<\/pre>\n<p><img width=\"800\" height=\"204\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2023\/11\/gradio_Masked_Language_Modeling_oregon_800x204.png\" class=\"img-featured img-responsive wp-post-image\" decoding=\"async\" fetchpriority=\"high\"><\/p>\n<pre>\r\n[MASK] is the capital and largest city of Uganda.\r\n# For sure, everybody knows that the correct answer is \"Kampala\" and the probability to have \"Kampala\" as a proposition is not even in the propositions!\r\n\r\n# Juba 25% Juba is the capital and largest city of South Sudan. \r\n# Uganda 14%\r\n# Beni 8% A city in the Democratic Republic of Congo\r\n# Nairobi 6% Nairobi is the capital and largest city of Kenya.\r\n# It 6%\r\n\r\n\r\n<\/pre>\n<p><img width=\"800\" height=\"204\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2023\/11\/gradio_Masked_Language_Modeling_uganda_800x204.png\" class=\"img-featured img-responsive wp-post-image\" decoding=\"async\" fetchpriority=\"high\"><\/p>\n<p>Code: <a href=\"https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio\/004_pyyush_maskedlanguagemodeling\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio\/004_pyyush_maskedlanguagemodeling<\/a><\/p>\n<p><i>Source:<br \/>\n<a href=\"https:\/\/keras.io\/examples\/nlp\/masked_language_modeling\/\" target=\"_blank\" rel=\"noopener\">https:\/\/keras.io\/examples\/nlp\/masked_language_modeling\/<\/a><\/i><\/p>\n<h2>Cut the NLP &#038; Multilingualism&#8217;s Knot<\/h2>\n<p><b>One of the main impediments I wanted to solve is boiled down to this question: How to offer the same NLP features in an API in an unlimited number of languages? <\/b><\/p>\n<p>Until now, in fact, the English language predominates in AI, so the models are trained in this language. Two solutions are therefore available to us:<\/p>\n<ol>\n<li>Waiting for the situation to improve and therefore having an open source LLM including your missing languages. Time is then your enemy and it is risky but as we have seen, the NLLB initiative may solved the issue. <\/li>\n<li>Choose a &#8220;pivot&#8221; language such as English or French, Spanish. Then, the process wil be the following: translate the content, apply the selected AI models (NER, Keywords extraction, summarization, etc.) that you want to the newly translated text in English, then retranslate the result! Smarter and more pragmatic solution, at least it is all in your hands! <\/li>\n<\/ol>\n<p><b>To translate text from one language to another for translation in 200 languages with PyTorch and Hugging Face transformers, I will be using Facebook&#8217;s NLLB 200 3.3B<\/b><\/p>\n<p><i>Source: <a href=\"https:\/\/huggingface.co\/facebook\/nllb-200-3.3B\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/facebook\/nllb-200-3.3B<\/a><\/i><\/p>\n<p><b>Below, a quick presentation for each GitHub directory for this overall exploration of translation IA mechanism. Each directory contains a POC with the code. <\/b><\/p>\n<ul>\n<li><b>001a_giladd123_nllb_fastapi:<\/b> an attempt using No Language Left Behind (for instance nllb-200-distilled-600M) aka nllb and FastAPI to offer an endpoint for translation<\/li>\n<li><b>002_mlearning_ai:<\/b> using langdetect and again some experiments with nllb<\/li>\n<li><b>003_using_gradio:<\/b> using gradio, some concepts + again for translation extracted from <a href=\"https:\/\/huggingface.co\/spaces\/Geonmo\/nllb-translation-demo\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/spaces\/Geonmo\/nllb-translation-demo<\/a><\/li>\n<li><b>004_pyyush_maskedlanguagemodeling:<\/b> a use case with FastAPI and Roberta (xlm-roberta-base, xlm-roberta-large) for Masked language modeling<\/li>\n<\/ul>\n<h2>Using langdetect<\/h2>\n<p>A very basic usage but that can help to select automatically the language from your source inside an API enpoint dedicated to translation for instance \ud83d\ude42<br \/>\nAs the name indicates obviously: langdetect is a language detection library: detect one or several languages from a text.<\/p>\n<p><i>Code: <a href=\"https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio\/002_mlearning_ai\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_translation_gradio\/002_mlearning_ai<\/a><\/i><\/p>\n<h2>Model for Classification<\/h2>\n<p>Just few resources as a reminder for myself, another subject to explore with IA that should be a post in itself.<\/p>\n<ul>\n<li>bart-lage-mnli-yahoo-answers: <a href=\"https:\/\/huggingface.co\/joeddav\/bart-large-mnli-yahoo-answers\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/joeddav\/bart-large-mnli-yahoo-answers<\/a><\/li>\n<li>xlm-roberta-large-xnli: <a href=\"https:\/\/huggingface.co\/joeddav\/xlm-roberta-large-xnli\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/joeddav\/xlm-roberta-large-xnli<\/a><\/li>\n<li>DistilBart: distilbart-mnli-12-1 <a href=\"https:\/\/huggingface.co\/valhalla\/\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/valhalla\/<\/a><\/li>\n<\/ul>\n<p><b>Conclusion<\/b><br \/>\nThe translation problem is a finite problem, which is to say limited, the number of languages is not infinite. Not to mention the phenomenon of the disappearance of languages that will reduce their number and therefore the complexity of this translation issue! The end will come quickly maybe the translation capabilities addressing all languages will be avalable in 6 months, 1 year, 2 years. There will remain the thorny and much more costly question of customisation training corpus to work on translation this time but in a specific context. I will call it culture in some way. Just remember Uganda versus Oregon showed earlier.<\/p>\n<p><H2>More infos<\/H2><\/p>\n<ul>\n<li>Masked Language Modeling<br \/><a href=\"https:\/\/github.com\/pyyush\/MLM\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/pyyush\/MLM<\/a><\/li>\n<li>Zero-Shot Learning in Modern NLP<br \/><a href=\"https:\/\/joeddav.github.io\/blog\/2020\/05\/29\/ZSL.html\" target=\"_blank\" rel=\"noopener\">https:\/\/joeddav.github.io\/blog\/2020\/05\/29\/ZSL.html<\/a><\/li>\n<li>Flask API Hugging Face facebook\/bart-large-mnli<br \/><a href=\"https:\/\/github.com\/rajatdiptabiswas\/flask-api-hugging-face-fb-bart-large-mnli\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/rajatdiptabiswas\/flask-api-hugging-face-fb-bart-large-mnli<\/a><\/li>\n<li>Building and Deploying a FastAPI App with Hugging Face<br \/><a href=\"https:\/\/medium.com\/@qacheampong\/building-and-deploying-a-fastapi-app-with-hugging-face-9210e9b4a713\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@qacheampong\/building-and-deploying-a-fastapi-app-with-hugging-face-9210e9b4a713<\/a><\/li>\n<li>Question Answering API<br \/><a href=\"https:\/\/github.com\/Proteusiq\/huggingfastapi\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/Proteusiq\/huggingfastapi<\/a><\/li>\n<li>joeddav\/zero-shot-demo<br \/><a href=\"https:\/\/huggingface.co\/spaces\/joeddav\/zero-shot-demo\/tree\/main\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/spaces\/joeddav\/zero-shot-demo\/tree\/main<\/a><\/li>\n<li>Learn AI Translation with FB&#8217;s No Language Left Behind &#8211; NLLB-200 Python Code Tutorial<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=AGgzRE3TlvU\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=AGgzRE3TlvU<\/a><\/li>\n<li>How to do Free Speech-to-Text Transcription Better Than Google Premium API with OpenAI Whisper Model<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=msj3wuYf3d8\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=msj3wuYf3d8<\/a><\/li>\n<li>No Language Left Behind : Modeling<br \/><a href=\"https:\/\/github.com\/facebookresearch\/fairseq\/tree\/nllb\/examples\/nllb\/modeling\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/facebookresearch\/fairseq\/tree\/nllb\/examples\/nllb\/modeling<\/a><\/li>\n<li>How to fine-tune a NLLB-200 model for translating a new language<br \/><a href=\"https:\/\/cointegrated.medium.com\/how-to-fine-tune-a-nllb-200-model-for-translating-a-new-language-a37fc706b865\" target=\"_blank\" rel=\"noopener\">https:\/\/cointegrated.medium.com\/how-to-fine-tune-a-nllb-200-model-for-translating-a-new-language-a37fc706b865<\/a><\/li>\n<li>NLLB Serve<br \/><a href=\"https:\/\/github.com\/thammegowda\/nllb-serve\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/thammegowda\/nllb-serve<\/a><\/li>\n<li>deepl-python<br \/><a href=\"https:\/\/github.com\/DeepLcom\/deepl-python\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/DeepLcom\/deepl-python<\/a><\/li>\n<li>argos-translate<br \/><a href=\"https:\/\/github.com\/argosopentech\/argos-translate\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/argosopentech\/argos-translate<\/a><\/li>\n<li>deep-translator<br \/><a href=\"https:\/\/github.com\/nidhaloff\/deep-translator\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/nidhaloff\/deep-translator<\/a><\/li>\n<li>DeepL<br \/><a href=\"https:\/\/www.deepl.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.deepl.com\/<\/a><\/li>\n<li>Top 10 DeepL Alternatives &#038; Competitors<br \/><a href=\"https:\/\/www.g2.com\/products\/deepl\/competitors\/alternatives\" target=\"_blank\" rel=\"noopener\">https:\/\/www.g2.com\/products\/deepl\/competitors\/alternatives<\/a><\/li>\n<li>begin python<br \/><a href=\"https:\/\/www.freecodecamp.org\/news\/python-code-examples-sample-script-coding-tutorial-for-beginners\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.freecodecamp.org\/news\/python-code-examples-sample-script-coding-tutorial-for-beginners\/<\/a><\/li>\n<li>plagiarism (llm-detect-ai-generated-text)<br \/><a href=\"https:\/\/www.kaggle.com\/competitions\/llm-detect-ai-generated-text\" target=\"_blank\" rel=\"noopener\">https:\/\/www.kaggle.com\/competitions\/llm-detect-ai-generated-text<\/a><\/li>\n<li>Deploy Your LLM API on CPU<br \/><a href=\"https:\/\/python.plainenglish.io\/deploy-your-llm-api-on-cpu-d350e38a7dbd\" target=\"_blank\" rel=\"noopener\">https:\/\/python.plainenglish.io\/deploy-your-llm-api-on-cpu-d350e38a7dbd<\/a><\/li>\n<li>Getting started with Llama<br \/><a href=\"https:\/\/ai.meta.com\/llama\/get-started\/\" target=\"_blank\" rel=\"noopener\">https:\/\/ai.meta.com\/llama\/get-started\/<\/a><\/li>\n<li>Unleash the Power of Llama: Build an Interactive Web App with Next.js and FastAPI!<br \/><a href=\"https:\/\/medium.com\/@chrisswhitneyy\/unleash-the-power-of-llama-build-an-interactive-web-app-with-next-js-and-fastapi-9146c4647a87\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@chrisswhitneyy\/unleash-the-power-of-llama-build-an-interactive-web-app-with-next-js-and-fastapi-9146c4647a87<\/a><\/li>\n<li>Zeroshot Classification<br \/><a href=\"https:\/\/akgeni.medium.com\/zeroshot-classification-864a278628f6\" target=\"_blank\" rel=\"noopener\">https:\/\/akgeni.medium.com\/zeroshot-classification-864a278628f6<\/a><\/li>\n<li>Zero-Shot Learning in Modern NLP<br \/><a href=\"https:\/\/joeddav.github.io\/blog\/2020\/05\/29\/ZSL.html\" target=\"_blank\" rel=\"noopener\">https:\/\/joeddav.github.io\/blog\/2020\/05\/29\/ZSL.html<\/a><\/li>\n<li>facebook\/bart-large-mnli<br \/><a href=\"https:\/\/huggingface.co\/facebook\/bart-large-mnli\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/facebook\/bart-large-mnli<\/a><\/li>\n<li>NLI Models as Zero-Shot Classifiers<br \/><a href=\"https:\/\/jaketae.github.io\/study\/zero-shot-classification\/\" target=\"_blank\" rel=\"noopener\">https:\/\/jaketae.github.io\/study\/zero-shot-classification\/<\/a><\/li>\n<li>Keyword Extraction with BERT<br \/><a href=\"https:\/\/jaketae.github.io\/study\/keyword-extraction\/\" target=\"_blank\" rel=\"noopener\">https:\/\/jaketae.github.io\/study\/keyword-extraction\/<\/a><\/li>\n<li>Building a Text Preprocessing Microservice with FastAPI<br \/><a href=\"https:\/\/towardsdatascience.com\/building-a-text-preprocessing-microservice-with-fastapi-ca7912050ba\" target=\"_blank\" rel=\"noopener\">https:\/\/towardsdatascience.com\/building-a-text-preprocessing-microservice-with-fastapi-ca7912050ba<\/a><\/li>\n<li>Zero and Few Shot Learning<br \/><a href=\"https:\/\/towardsdatascience.com\/zero-and-few-shot-learning-c08e145dc4ed\" target=\"_blank\" rel=\"noopener\">https:\/\/towardsdatascience.com\/zero-and-few-shot-learning-c08e145dc4ed<\/a><\/li>\n<li>ChatCLP \u2014 HuggingFace Transformers Part 1<br \/><a href=\"https:\/\/medium.com\/devnullblog\/chatclp-build-a-chatbot-using-transformers-1f4ee9739edb\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/devnullblog\/chatclp-build-a-chatbot-using-transformers-1f4ee9739edb<br \/>\n<\/a><\/li>\n<li>How to Implement Zero-Shot Classification using Python<br \/><a href=\"https:\/\/www.section.io\/engineering-education\/how-to-implement-zero-shot-classification-using-python\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.section.io\/engineering-education\/how-to-implement-zero-shot-classification-using-python\/<\/a><\/li>\n<li>Text-Summarization<br \/><a href=\"https:\/\/github.com\/aj-naik\/Text-Summarization\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/aj-naik\/Text-Summarization<\/a><\/li>\n<li>Using fastText<br \/><a href=\"https:\/\/fasttext.cc\/docs\/en\/support.html\" target=\"_blank\" rel=\"noopener\">https:\/\/fasttext.cc\/docs\/en\/support.html<\/a><\/li>\n<li>Check the ressource nllb200 on GitHub<br \/><a href=\"https:\/\/github.com\/topics\/nllb200\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/topics\/nllb200<\/a><\/li>\n<li>Language Detection: detect one or several languages from a text with langdetect<br \/><a href=\"https:\/\/pypi.org\/project\/langdetect\/\" target=\"_blank\" rel=\"noopener\">https:\/\/pypi.org\/project\/langdetect\/<\/a><\/li>\n<li>Gradio tutorial (Build machine learning applications)<br \/><a href=\"https:\/\/www.machinelearningnuggets.com\/gradio-tutorial\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.machinelearningnuggets.com\/gradio-tutorial\/<\/a><\/li>\n<li>Creating A Language Translator App Using Gradio<br \/><a href=\"https:\/\/analyticsindiamag.com\/creating-a-language-translator-app-using-gradio\/\" target=\"_blank\" rel=\"noopener\">https:\/\/analyticsindiamag.com\/creating-a-language-translator-app-using-gradio\/<\/a><\/li>\n<li>Building NLP Web Apps With Gradio And Hugging Face Transformers<br \/><a href=\"https:\/\/towardsdatascience.com\/building-nlp-web-apps-with-gradio-and-hugging-face-transformers-59ce8ab4a319\" target=\"_blank\" rel=\"noopener\">https:\/\/towardsdatascience.com\/building-nlp-web-apps-with-gradio-and-hugging-face-transformers-59ce8ab4a319<\/a><\/li>\n<li>Gradio Guide<br \/><a href=\"https:\/\/www.gradio.app\/guides\" target=\"_blank\" rel=\"noopener\">https:\/\/www.gradio.app\/guides<\/a><\/li>\n<li>Transformers, what can they do?<br \/><a href=\"https:\/\/huggingface.co\/learn\/nlp-course\/chapter1\/3?fw=pt\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/learn\/nlp-course\/chapter1\/3?fw=pt<\/a><\/li>\n<li>Text Translation using NLLB and HuggingFace\u2014 Tutorial<br \/><a href=\"https:\/\/medium.com\/mlearning-ai\/text-translation-using-nllb-and-huggingface-tutorial-7e789e0f7816\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/mlearning-ai\/text-translation-using-nllb-and-huggingface-tutorial-7e789e0f7816<\/a><\/li>\n<\/ul>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have already mentioned many times on this blog the obstacles linked to managing a multilingual digital product. Indeed, whether you are creating a mobile&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2023\/11\/crafting-fluent-translation-api-a-quick-journey-into-text-translation-with-nllb-huggingface-and-fastapi-plus-a-small-dive-into-roberta-masked-language-modeling-with-gradio\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Crafting Fluent Translation API: A quick Journey into Text Translation with NLLB, HuggingFace, and FastAPI, Plus a small Dive into Roberta Masked Language Modeling with Gradio<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Build a fluent translation API using NLLB, HuggingFace, and FastAPI. Dive into Roberta Masked Language Modeling with Gradio for multilingual NLP tasks.","bf_ai_og_title":"Crafting Fluent Translation API","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3438,3437,3444,3447,3448,3449,3450,3435],"tags":[2532,2183,164,1917,3072,2200,3063,3068,3067,3064,3065,2434,3069,3066,3040,787,3078,2529,3074,2540,153,3076,2776,3070,3077,3492,3071,2387,3075,2580,3073,3049],"class_list":["post-12678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-machine-learning","category-business-case-studies","category-programming-databases","category-technology-trends","category-tools-productivity","category-tutorials-how-to","category-ux-product-design","category-web-development","tag-anaconda","tag-api","tag-apps","tag-azure","tag-azure-cli","tag-cloud","tag-container","tag-containers","tag-deployment","tag-design-thinking-process","tag-devops-lifecycle","tag-docker","tag-docker-compose-yaml","tag-experiments","tag-fastapi","tag-github","tag-gradio","tag-how-to","tag-huggingface","tag-ia","tag-images","tag-llm","tag-machine-learning","tag-makefile","tag-masked-language-modeling","tag-nllb","tag-pamela-fox","tag-poc","tag-roberta","tag-spacy","tag-translation","tag-whisper"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-3iu","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2023\/11\/ia_translation_b.png","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=12678"}],"version-history":[{"count":7,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12678\/revisions"}],"predecessor-version":[{"id":12718,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12678\/revisions\/12718"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/12680"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=12678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=12678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=12678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}