The T5 model is a Text-to-Text Transfer Transformer model that was developed by Google Research. It's a large-scale transformer-based language model that's designed to handle a wide range of NLP tasks, including translation, summarization, and question answering.
- Python (v3.10+ recommended)
- Poetry (A Python packaging and dependency management tool)
-
For the demo to work, you need to get HuggingFaceAPI Token:
- Visit HuggingFace.
- Sign up or log in.
- Navigate to
Profile -> Settings -> Access Tokens
. - Copy an existing token or create a new one.
-
Install Dependencies
poetry install
-
Running The Agent Script
open terminal goto "t5-base/src", run below command to load environment variables and run the agent.
export HUGGING_FACE_ACCESS_TOKEN="{Your HuggingFaceAPI Token}" poetry run python agent.py
Check the log for "adding t5-base agent to bureau" line and copy the {agent address}.
-
Running The User Script
open terminal and goto "t5-base/src",run below command to load environment variables and run the client.
export T5_BASE_AGENT_ADDRESS="{ agent address from last step }" poetry run python client.py
After running the command, a request is sent to the agent every 30 sec till its successful.
Modify INPUT_TEXT in t5_base_user.py to translate different sentence.