Code Monkey home page Code Monkey logo

graph-database's Introduction

Graph database with CRUD and save/load operations

This project demonstrates building and exploring knowledge graphs (KGs) using either of the two models: Rebel(seq2seq) and Gemini(Google LLM).

Functionalities

  • KG Construction: Build KGs using either:
    • Provided Text: Define your own text for analysis.
    • Gemini-Generated Text: Let Gemini generate text for KG construction.
  • Model Selection: Choose between Rebel and Gemini for relation extraction.
  • Querying: Perform various KG queries:
    • Keyword search
    • Semantic BFS (breadth-first search)
    • Semantic document search based on embeddings
  • Visualization: Convert the KG to a network graph for visual exploration (requires pyvis library).

Running the Project

  1. Access the Colab Notebook: [Link to your Colab notebook here]
  2. Install Libraries: Follow the instructions in the notebook to install required libraries (e.g., rebel-api, pyvis).
  3. Obtain API Keys: If using Rebel, acquire an API key from https://huggingface.co/Babelscape/rebel-large and set the REBEL_API_KEY environment variable in Colab. For Gemini, obtain your gemini api key and set the GOOGLE_API_KEY.
  4. Run Cells: Execute the notebook cells to construct, query, and visualize your KG.

Additional Notes

  • Refer to the notebook for detailed explanations and customization options.
  • Experiment with different text inputs, models, and query types to explore your data.
  • Consider installing pyvis locally for offline visualization.

This project provides a starting point for building and interacting with KGs using LLMs in Google Colab. Feel free to adapt and extend it for your specific needs.

graph-database's People

Contributors

ilikepizza2 avatar

Watchers

 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.