Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateusdtakayama/groq-translation-app
This repository features a Streamlit app for translating text using the GROQ API, offering both formal and informal styles. It also includes a FastAPI server for efficient translation requests. Enhance your language translation experience!
https://github.com/mateusdtakayama/groq-translation-app
gemini gemini-api groq groq-api langchain langchain-python langserve python streamlit
Last synced: 13 days ago
JSON representation
This repository features a Streamlit app for translating text using the GROQ API, offering both formal and informal styles. It also includes a FastAPI server for efficient translation requests. Enhance your language translation experience!
- Host: GitHub
- URL: https://github.com/mateusdtakayama/groq-translation-app
- Owner: mateusdtakayama
- Created: 2024-10-16T02:19:03.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2024-10-29T20:38:16.000Z (14 days ago)
- Last Synced: 2024-10-29T22:50:20.573Z (14 days ago)
- Topics: gemini, gemini-api, groq, groq-api, langchain, langchain-python, langserve, python, streamlit
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[PYTHON__BADGE]: https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white
[STREAMLIT__BADGE]: https://img.shields.io/badge/Streamlit-FF4B4B?style=for-the-badge&logo=streamlit&logoColor=white
[FASTAPI__BADGE]: https://img.shields.io/badge/FastAPI-009688?style=for-the-badge&logo=fastapi&logoColor=white
[GOOGLEAPI__BADGE]: https://img.shields.io/badge/Google%20API-4285F4?style=for-the-badge&logo=google&logoColor=white
[GROQ__BADGE]: https://img.shields.io/badge/GROQ-00BFFF?style=for-the-badge&logo=graphql&logoColor=whiteTranslation API and App
![python][PYTHON__BADGE]
![streamlit][STREAMLIT__BADGE]
![fastapi][FASTAPI__BADGE]
![googleapi][GOOGLEAPI__BADGE]
![groq][GROQ__BADGE]
About •
Getting Started •
Collaborators
📌 About
This repository contains two applications:
1. **Translation App**: Built with Streamlit, this application uses the GROQ API to translate text into different languages. Users can input text and receive translations in both formal and informal styles.
2. **Translation Server**: Developed using FastAPI, this server interacts with the same GROQ API to provide translation services. It is designed to handle requests and return translations in a straightforward manner.
🚀 Getting Started
Prerequisites
Ensure you have the following installed:
- [Python 3.x](https://www.python.org/)
- [Git](https://git-scm.com/)1. Cloning the Repository
Clone the project repository to your local machine:
```bash
git clone https://github.com/mateusdtakayama/groq-translation-app
cd groq-translation-app
```2. Setting Up a Virtual Environment
It's recommended to use a virtual environment to manage your project dependencies. Follow these steps:
2.1 Create a virtual environment:
```bash
python -m venv venv
```2.2 Activate the virtual environment:
- On Windows:
```bash
venv\Scripts\activate
```- On macOS/Linux:
```bash
source venv/bin/activate
```### 3. Configuring the GROQ API Key
To utilize GROQ services in this project, you'll need to configure your GROQ API key. Follow these steps to set it up:
#### 3.1 Obtain Your GROQ API Key
Sign up and obtain your API key from the GROQ API provider.
#### 3.2 Store the API Key Securely
In your project directory, create a `.env` file if it doesn't already exist.
Add your API key to the `.env` file in the following format:
```bash
GROQ_API_KEY=your-groq-api-key-here
```4. Starting
4.1 Install dependencies
```bash
pip install -r requirements.txt
```4.2 Start the Translation Application
To run the translation application, which uses the `app.py` script, execute the following command:
```bash
streamlit run app.py
```This will start the Streamlit application and open it in your default web browser, allowing you to interact with the translation features.
4.3 Start the Translation Server
To run the FastAPI server, which uses the serve.py script, execute the following command:
```bash
python3 serve.py
```This will start the FastAPI server, and you can interact with it through the /chain endpoint.
🤝 Collaborator