Skip to content

NjProVk/YTranslateHWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instant Translator

An instant text translator utilizing Flask and Helsinki-NLP transformers. As you type into the input field, real-time translations are fetched via AJAX requests.

📝 Content

📁 Project Structure

  • app.py: Main Flask server file.
  • hws.py: Houses translation functions using Helsinki-NLP transformers.
  • Dockerfile: Instructions for containerizing the app.
  • requirements.txt: Required dependencies.

🚀 Installation and Launch

Using Docker

  1. Install Docker.
  2. Build the Docker image:
docker build -t instant-translator .
  1. Run:
docker run -p 8894:8894 instant-translator

Without Docker

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the Flask app:
python app.py

Visit http://localhost:8894/ to use the translator.

⚠️ Important Note

Ensure you have sufficient RAM. Transformer models can be resource-intensive.

Мгновенный Переводчик

Мгновенный переводчик текста на Flask и с трансформаторами Helsinki-NLP. При вводе в текстовое поле происходит мгновенный перевод с помощью AJAX-запросов.

📝 Содержание

📁 Структура Проекта

  • app.py: Основной серверный файл Flask.
  • hws.py: Функции перевода с использованием трансформаторов Helsinki-NLP.
  • Dockerfile: Инструкции для контейнеризации приложения.
  • requirements.txt: Необходимые зависимости.

🚀 Установка и Запуск

С Docker

  1. Установите Docker.
  2. Соберите Docker-образ:
docker build -t instant-translator .
  1. Запустите:
docker run -p 8894:8894 instant-translator

Без Docker

  1. Установите зависимости:
pip install -r requirements.txt
  1. Запустите Flask-приложение:
python app.py

Перейдите по адресу http://localhost:8894/, чтобы использовать переводчик.

⚠️ Важное Примечание

Убедитесь, что у вас достаточно оперативной памяти. Модели трансформеров могут требовать много ресурсов.

About

Offline text translation on your device with an easy and clear interface!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •