Skip to content

Ayushmanas/knowledge-graph-streamlit-app

Repository files navigation


Knowledge Graph

-- All credits go to user @thu_vu92 and reddit.com

This application is a simple streamlit based web interface to take in any summarized text data for a show,movie or any other media for which we have a synopsis.

It extracts graph entities(entities & relationships) from text input using Lang graph and OpenAi's gpt4-o, and uses Pyviz to create a visualized representation of knowledge graph, in order to summarize information through a DAG(Directed Acyclic Graph).

Screenshot-app-run-1

Screenshot-app-run-2

Features

  • Dual input methods: text upload(.txt) or a direct text input
  • Interactive visualization for knowledge graph
  • Entity relationship extraction based on ChatGPT's gpt-4o model
  • Physics based layout for customizable graph display

Installation

You need to have Python>=3.8 installed, and preferable a code editor like VScode.

Download & Run the requirements.txt file using the below command: pip install -r requirements.txt You can set it up in a new virtual environment if needed.

Prerequisites

You might need to store the secret credentail key from Open AI inside a .env file with the name OPENAI_API_KEY

Run the app

To run the above app, in your terminal or powershell, just type: streamlit run app.run and it will open a new window in your browser to run this app.

Note: If you get some prompts in the command shell for email, etc, just press enter and keep it running.

For closing this app, press Ctrl+C in the terminal to close.


About

Any apps made using streamlit for AI and ML projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors