Spaces:
Runtime error
A newer version of the Gradio SDK is available: 6.14.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-searchCreate a
.envfile 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_keyCopy the
.envfile to thedockerfolder:cp .env docker/.envCreate 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-searchBuild and start the Docker containers:
docker-compose up --buildThis command will build the Docker image and start the containers defined in the
docker-compose.ymlfile.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.