LinguaCanvas / README.md
S-Dreamer's picture
Update README.md
9461e92 verified
---
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:
```bash
git clone https://github.com/yourusername/english-farsi-translator.git
cd english-farsi-translator
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run the application:
```bash
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](CONTRIBUTING.md) for details on:
- Code style
- Development process
- Pull request process
- Testing requirements
## πŸ“ Documentation
For detailed information about the API and installation process, check:
- [API Documentation](docs/API.md)
- [Installation Guide](docs/INSTALLATION.md)
## βš™οΈ 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