Spaces:
Build error
Build error
File size: 2,920 Bytes
cc9f5f0 9461e92 cc9f5f0 b98a046 cc9f5f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
---
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 |