'Hey Computer, Talk to Me in Polish': Building a Polish-language Speaking Chatbot
Use Amazon SageMaker, Hugging Face, TRURL 2, and Streamlit to build a foreign language chatbot.
- Pre-installed tools:
- Most recent AWS CLI.
- AWS CDK in version 2.104.0 or higher.
- Python 3.10 or higher.
- Node.js v21.x or higher.
- Configured profile in the installed AWS CLI with credentials for your AWS IAM user account.




trurl-2
directory and explore the capabilities of the TRURL 2 model that you will deploy from the SageMaker Studio notebook as an Amazon SageMaker Endpoint and CodeWhisperer will be our AI-powered coding companion throughout the process.

CTRL/CMD + ENTER
). Remember that before executing the clean-up section and invoking the cell with predictor.delete_endpoint()
, you should stop, as we will need the running endpoint for the next section.

endpoint_name
value inside Jupyter notebook when you invoked huggingface_model.deploy(...)
operation."assistant"
) to visualize that in the conversation flow. For those who do not speak Polish, the main part of the prompt sets a friendly conversational tone and asks the chatbot to play a game of 20 questions, where a player specifies the category to guess as an entry point to the conversation.ml.g5.2xlarge
) and compute for kernel that was used by Amazon SageMaker Studio Notebook (1x ml.t3.medium
). Assuming that we have set up all infrastructure in eu-west-1
, the total cost of using 8 hours of cloud resources from this code sample will be lower than $15 (here you can find detailed calculation). Everything else you created with the infrastructure as code (via AWS CDK) has a much lower cost, especially within the discussed time constraints.Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.