This project is a Multi-agent-back-end designed to provide advanced text using a transformer-based language model.
- Transformers Agents: A Python-based code that performs several agents with different functionalities.
- Fast API: A lightweight API that receives user input, processes it, and communicates with the transformer agent to returns a translated text for example.
- Language Translation Engine: Built using Python and Hugging Face Transformers.
- Translation Logic: Processes input text and translates it to the desired language.
- Endpoints:
POST /translate
: Accepts text input and target language parameters.GET /status
: Checks the API's operational status.
- Middleware: Includes input validation and error handling.
- Communication: Sends translation requests to the Python agent with HTTP.
python -m venv venv
source venv/Scripts/activate (Windows)
source venv/bin/activate (Linux/Mac)
pip install transformers torch protobuf sentencepiece tiktoken python-dotenv fastapi[standard] uvicorn
python run_scripts.py
uvicorn main:app --reload
{
"origin_text": "Esse gordo diz mentiras.",
"origin_lang": "pt_XX",
"dest_lang": "en_XX"
}
{
"translated_text": "That fat guy's lying."
}
The way things are translated will depend on the AI model you are using, some may not be as accurate in their training.
Contributions are welcome! Feel free to open an issue or submit a pull request for improvements or feature suggestions.
Hugging Face is one of the most innovative and influential platforms for those working with AI, especially NLP, making the use of advanced models more accessible to developers and researchers. All AI models and similar libraries from this application were found there.