Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.19 KB

README.md

File metadata and controls

54 lines (41 loc) · 1.19 KB

GenAI Classification

This project uses LangChain and OpenAI to classify companies and retrieve related information.

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up API keys:

    • Create a config.ini file in the root directory with the following content:
      [API_KEYS]
      TAVILY_API_KEY = your_tavily_api_key
      OPENAI_API_KEY = your_openai_api_key
  5. Prepare data files:

    • Ensure taxanomy.csv and data.csv are present in the root directory.

Running the Code

  1. Run the script:
    python genAI_clasification.py

Error Handling

  • The script includes error handling for missing files and missing columns in the data.
  • If any errors occur during processing, they will be printed to the console.

Dependencies

  • langchain-openai
  • langchain-community
  • langchain-core
  • langgraph
  • pandas
  • configparser