otoz-smart-search / README.md
teenaxta's picture
Upload 15 files
7baafc3 verified
---
title: Otoz Smart Search
emoji: πŸ‘
colorFrom: pink
colorTo: indigo
sdk: gradio
sdk_version: 4.43.0
app_file: app.py
pinned: false
license: cc-by-nc-2.0
---
# Smart Search
This project implements a Mini GPT model using FastAPI, Langchain, and Docker.
## Prerequisites
- Docker
- Docker Compose
## Setup
1. Clone the repository:
```
git clone https://github.com/netsol-research/smart-search
cd smart-search
```
2. Create a `.env` file in the project root and add your environment variables:
```
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_DEFAULT_REGION=your_aws_region
OPENAI_API_KEY=your_openai_api_key
PINECONE_API_KEY=your_pinecone_api_key
```
3. Copy the `.env` file to the `docker` folder:
```
cp .env docker/.env
```
4. Create a virtual environment (optional but recommended):
```
python -m venv env
source env/bin/activate # On Windows, use `env\Scripts\activate`
```
5. Install the required packages:
```
pip install -r requirements.txt
```
## Running the Application
To build and run the Docker container:
1. Navigate to the project root directory:
```
cd smart-search
```
2. Build and start the Docker containers:
```
docker-compose up --build
```
This command will build the Docker image and start the containers defined in the `docker-compose.yml` file.
3. Once the containers are running, you can access the API at `http://localhost:8000`
To stop the containers, use:
```
docker-compose down
```
This will stop and remove the containers, networks, and volumes created by the `docker-compose.yml` file.