Spaces:
Runtime error
A newer version of the Gradio SDK is available:
5.21.0
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
Clone the repository:
git clone https://github.com/netsol-research/smart-search cd smart-search
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
Copy the
.env
file to thedocker
folder:cp .env docker/.env
Create a virtual environment (optional but recommended):
python -m venv env source env/bin/activate # On Windows, use `env\Scripts\activate`
Install the required packages:
pip install -r requirements.txt
Running the Application
To build and run the Docker container:
Navigate to the project root directory:
cd smart-search
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.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.