LinguaCanvas / README.md
S-Dreamer's picture
Update README.md
9461e92 verified

A newer version of the Gradio SDK is available: 5.23.1

Upgrade
metadata
license: apache-2.0
title: LinguaCanvas
sdk: gradio
emoji: πŸ’»
colorFrom: red
colorTo: purple
short_description: English-Farsi Translation Interface 🌐
sdk_version: 5.21.0

English-Farsi Translation Interface 🌐

A sophisticated translation interface that provides culturally-sensitive translations between English and Farsi, powered by machine learning and enhanced with cultural context annotations.

✨ Features

  • Bidirectional Translation: Seamless translation between English and Farsi
  • Cultural Context: Provides explanations for idioms and cultural expressions
  • User-Friendly Interface: Clean, intuitive Gradio-based web interface
  • Real-time Translation: Instant translation with cultural annotations
  • RTL Support: Full support for right-to-left text in Farsi

πŸš€ Quick Start

  1. Clone the repository:
git clone https://github.com/yourusername/english-farsi-translator.git
cd english-farsi-translator
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

The application will be available at http://0.0.0.0:8000

πŸ› οΈ Project Structure

β”œβ”€β”€ app.py              # Main application file
β”œβ”€β”€ utils.py            # Utility functions
β”œβ”€β”€ cultural_utils.py   # Cultural context handling
β”œβ”€β”€ css.py             # CSS styles for Gradio interface
β”œβ”€β”€ styles.css         # Additional CSS styles
β”œβ”€β”€ docs/              # Documentation
β”œβ”€β”€ tests/             # Test files
└── requirements.txt   # Project dependencies

πŸ’‘ Usage

  1. Select source and target languages from the dropdown menus
  2. Enter text in the input box
  3. Click "Translate" to get the translation
  4. View cultural context annotations below the translation

πŸ” Features in Detail

  • Text Preprocessing: Handles special characters and formatting
  • Cultural Context Detection: Identifies and explains cultural idioms
  • Language Detection: Automatic detection of input language
  • Error Handling: Robust error management with helpful messages
  • Responsive Design: Works on both desktop and mobile devices

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • Code style
  • Development process
  • Pull request process
  • Testing requirements

πŸ“ Documentation

For detailed information about the API and installation process, check:

βš™οΈ Technical Requirements

  • Python 3.8+
  • Required packages:
    • transformers
    • gradio
    • torch
    • sentencepiece
    • protobuf

πŸ”’ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • Persian NLP community for the translation model
  • Contributors and maintainers
  • Gradio team for the interface framework