{"id":13456685,"url":"https://github.com/yoheinakajima/instagraph","last_synced_at":"2025-05-14T20:06:58.777Z","repository":{"id":194410701,"uuid":"690777908","full_name":"yoheinakajima/instagraph","owner":"yoheinakajima","description":"Converts text input or URL into knowledge graph and displays","archived":false,"fork":false,"pushed_at":"2023-12-24T23:16:37.000Z","size":222,"stargazers_count":3518,"open_issues_count":23,"forks_count":288,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-13T14:06:32.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoheinakajima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-12T21:25:09.000Z","updated_at":"2025-04-13T01:36:02.000Z","dependencies_parsed_at":"2023-12-01T03:27:14.235Z","dependency_job_id":"c76cb012-cd78-4347-990a-7231bdc18d5a","html_url":"https://github.com/yoheinakajima/instagraph","commit_stats":null,"previous_names":["yoheinakajima/instagraph"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoheinakajima%2Finstagraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoheinakajima%2Finstagraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoheinakajima%2Finstagraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoheinakajima%2Finstagraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoheinakajima","download_url":"https://codeload.github.com/yoheinakajima/instagraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724639,"owners_count":21151561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:01:26.005Z","updated_at":"2025-04-13T14:06:40.845Z","avatar_url":"https://github.com/yoheinakajima.png","language":"Python","funding_links":[],"categories":["Python","HTML","知识图谱"],"sub_categories":["其他_文本生成、文本对话"],"readme":"Note for non-coders: you can sign up for the waitlist at [instagraph.ai](https://instagraph.ai).\n\n# InstaGraph 🌐\n\nHello there, adventurous coder! Welcome to InstaGraph, your go-to application for converting text or URLs into insightful knowledge graphs. Curious about the relationships between entities in a complex topic? Feed the text to InstaGraph and voila! A beautiful knowledge graph is at your fingertips.\n\nSee example flowcharts generated by InstaGraph [here](https://twitter.com/yoheinakajima/status/1701351068817301922).\n\nPowered by OpenAI's GPT-3.5, this Flask application turns your text into a vividly colored graph, making it easier to visualize relationships between various entities. Enough talking—let's get started!\n\n***Author's TL;DR**: If you're just looking for how the knowledge graph is generated, check out the function call parameters taking up half of main.py.*\n\n## Table of Contents 📚\n\n- [Features](#features-)\n- [Installation](#installation-%EF%B8%8F)\n- [Usage](#usage-)\n- [Contributing](#contributing-)\n- [License](#license-)\n\n## Features 🌟\n\n- Dynamic Text to Graph conversion.\n- Color-coded graph nodes and edges.\n- Responsive design—use it on any device.\n- Super-duper user-friendly!\n\n## Installation 🛠️\n\nTo get started, you'll need Python and pip installed.\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/yoheinakajima/instagraph.git\n```\n\n#### 2. Navigate to the project directory\n\n```bash\ncd instagraph\n```\n\n#### 3. Install the required Python packages\n\n```bash\npip install -r requirements.txt\n```\n\n#### 4. Set up your OpenAI API Key\n\nChange .env.example to .env\n\n```text\nmv .env.example .env\n```\n\nAdd your OpenAI API key to .env file:\n\n```text\nOPENAI_API_KEY=your-api-key-here\n```\n\n##### Optional - Set a Graph Database\n\nUse: `[--graph neo4j|falkordb]` to select the Graph Database driver\n\n- Neo4J\n\nAdd Neo4J username, password and URL in the `*.env` file as well by creating an instance of [neo4j](https://neo4j.com/cloud/platform/aura-graph-database).\n\n```text\nNEO4J_USERNAME=\nNEO4J_PASSWORD=\nNEO4J_URI=\n```\n\n- FalkorDB\n\nAdd FalkorDB URL in the `*.env` file as well by creating an instance of [FlakorDB](https://www.falkordb.com/try-free).\n\n```text\nFALKORDB_URL=\n```\n\n#### 5. Run the Flask app\n\n```bash\npython main.py [--graph neo4j|falkordb] [--port port] [--debug]\n```\n\nNavigate to `http://localhost:8080` to see your app running.\n\n## Run as Container\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/yoheinakajima/instagraph.git\n```\n\n#### 2. Navigate to the project docker directory\n\n```bash\ncd instagraph/docker\n```\n\n#### 3.1 Run in Dev mode\n\n```bash\ndocker-compose -f docker-compose-dev.yml up # Add -d flag at the end to run in background/daemon mode.\n```\n\n#### 3.2 Run in Prod - Create the docker image\n\n- Using the `gunicorn==21.2.0` to run the application in production mode\n\n```bash\ndocker-compose -f docker-compose.yml up --build -d\n```\n\n## Usage 🎉\n\n### Web Interface\n\n- Open your web browser and navigate to `http://localhost:8080`.\n- Type your text or paste a URL in the input box.\n- Click \"Submit\" and wait for the magic to happen!\n\n### API Endpoints\n\n1. **GET Response Data**: `/get_response_data`\n\n    - Method: `POST`\n    - Data Params: `{\"user_input\": \"Your text here\"}`\n    - Response: GPT-3.5 processed data\n\n2. **GET Graph Data**: `/get_graph_data`\n\n    - Method: `POST`\n    - Response: Graph Data\n\n3. **GET History Data**: `/get_graph_history`\n\n    - Method: `GET`\n    - Response: Graph Data\n\n## Contributing 🤝\n\nBest way to chat with me is on Twitter at [@yoheinakajima](https://twitter.com/yoheinakajima). I usually only code on the weekends or at night, and in pretty small chunks. I have lots ideas on what I want to add here, but obviously this would move faster with everyone. Not sure I can manage Github well given my time constraints, so please reach out if you want to help me run the Github. Now, here are a few ideas on what I think we should add based on comments...\n- ~~Store knowledge graph~~ (thx [@tomasonjo](https://github.com/tomasonjo)! 9/13/23)\n- ~~Pull knowledge graph from storage~~ (thx [@tomasonjo](https://github.com/tomasonjo)! 9/13/23)\n- Show history\n- Ability to combine two graphs\n- Ability to combine 2+ graphs from history\n- ~~Ability to expand on a graph~~ (thx [@tomasonjo](https://github.com/tomasonjo)! 9/13/23)\n- Ability to expand on graph from specific nodes\n- Fuzzy matching of nodes for combining graphs (vector match + LLM confirmation)\n\nThere are a lot of \"build a chart\" tools out there, so instead of doing user account and custom charts, it sounds more fun for me to work on building the largest knowledge graph ever...\n\nBefore creating an Issue please refer the [ISSUE_TEMPLATE](https://github.com/yoheinakajima/instagraph/tree/main/.github/ISSUE_TEMPLATE) provided.\n\n## License 📝\n\nMIT License. See [LICENSE](LICENSE) for more information.\n\n---\n\nEnjoy using InstaGraph! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoheinakajima%2Finstagraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoheinakajima%2Finstagraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoheinakajima%2Finstagraph/lists"}