Spaces:
Build error
Build error
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 |