Welcome to the GenZ Translator! This app translates text between formal English and Gen Z language, making communication fun and accessible, especially between Gen Z and other generations.
- Features
- Installation
- Usage
- Libraries Used
- Translate formal English to Gen Z language.
- Translate Gen Z language to formal English.
- User-friendly interface built with Streamlit.
- Powered by OpenAI's GPT-4o for accurate and context-aware translations.
- Ability to adjust response creativity.
- Python 3.8 or higher
-
Clone the repository:
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required libraries:
pip install -r requirements.txt
-
Set up OpenAI API key:
- Obtain your OpenAI API key from OpenAI.
- Create a
.envfile in the root directory of the project and add your API key:OPENAI_API_KEY=your_openai_api_key
-
Run the app:
streamlit run app.py
- Open your web browser and go to
http://localhost:8501. - Enter the text you want to translate in the input box.
- Select the translation direction (Formal to Gen Z or Gen Z to Formal).
- Click the "Translate" button to see the translated text.
- OpenAI SDK: For accessing OpenAI's GPT-4 model.
- Streamlit: For building the web interface.
- dotenv: For managing environment variables.