Code Monkey home page Code Monkey logo

text2graph's Introduction

Text2Graph

Text2Graph model trained with T5

Similar to GraphGPT, this model converts unstructured natural language into a knowledge graph. We provide the trained T5 model for triple extraction.

demo

Model

We select T5-base model for training with WebNLG dataset. The model file can be downloaded from Huggingface.

Run

  1. Backend

Note that you should download our T5 model and put it into the backend folder.

cd backend
pip install -r requirements.txt 
python apiCore.py
  1. Frontend
cd frontend
npm install
npm run start

text2graph's People

Contributors

xyjigsaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

text2graph's Issues

module not found

(3.9-JupyterLab) H:\Text2Graph\frontend>npm run start

[email protected] start
react-scripts start

node:internal/modules/cjs/loader:1078
throw err;
^

Error: Cannot find module './lib/parse'
Require stack:

  • H:\Text2Graph\frontend\node_modules\cross-spawn\index.js
  • H:\Text2Graph\frontend\node_modules\react-dev-utils\crossSpawn.js
  • H:\Text2Graph\frontend\node_modules\react-scripts\bin\react-scripts.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (H:\Text2Graph\frontend\node_modules\cross-spawn\index.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'H:\Text2Graph\frontend\node_modules\cross-spawn\index.js',
    'H:\Text2Graph\frontend\node_modules\react-dev-utils\crossSpawn.js',
    'H:\Text2Graph\frontend\node_modules\react-scripts\bin\react-scripts.js'
    ]
    }

Node.js v18.15.0

NotImplementedError

GPU_ID = "0"
os.environ["CUDA_VISIBLE_DEVICES"] = GPU_ID

use_cuda = torch.cuda.is_available()
if use_cuda:
print('GPU_ID: ', GPU_ID)
else:
raise NotImplementedError

Getting this error 

line 27, in
raise NotImplementedError
NotImplementedError

which version of transformers should I use?

when I run your code and load your pkl model file, I got error like this:
AttributeError: 'T5DenseReluDense' object has no attribute 'relu_act'

which version of transformers should I use?

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.