Code Monkey home page Code Monkey logo

curious-bees's Introduction

Flask Application with Qdrant Integration

This Flask application integrates with Qdrant for vectorized storing of posts and searching similar posts. It provides endpoints for both storing data and searching for similar content.

Prerequisites

  • Python 3.x
  • Flask
  • Qdrant Client

Installation

  1. Clone the repository:

    git clone https://github.com/LiveWiresSRM2023/Curious-Bees
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up Qdrant:

    • Obtain API key and URL from Qdrant
    • Create password.py with your API key and URL stored in the variables of the same name

Usage

  1. Start the Flask server:

    python SE&DB_API.py
  2. Send POST requests to store data:

    POST /data
    Content-Type: application/json
    
    {
        "user_id": "<user_id>",
        "type": "post",
        "content": "<content>",
        "id_token": "<id_token>"
    }
  3. Send POST requests to search for similar content:

    POST /search
    Content-Type: application/json
    
    {
        "user_id": "<user_id>",
        "type": "search",
        "content": "<content>",
        "id_token": "<id_token>"
    }
  4. Vectorize and Send Data to Database:

    We've implemented the vectorize_content and send_db functions in our Flask application. When sending a POST request with data, we vectorize the content using these functions and store it in the database along with its ID.

  5. Vectorize Query and Find Similar Posts:

    We've also implemented the similarity function in our Flask application. When sending a POST request for searching, we vectorize the content of the query and compare it with existing posts in the database to find similar ones. These similar posts are then sent back to the user.

Contributing

Contributions to improve the versatility and functionality of this project are welcome! Your effort in making this project robust is much appreciated!

curious-bees's People

Contributors

rajeshk1006 avatar dev-roshan-lab avatar nikil-d-gr8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.