Git Product home page Git Product logo

drqa-webui's Introduction

DrQA

DrQA is a PyTorch implementation of the DrQA system described in the ACL 2017 paper Reading Wikipedia to Answer Open-Domain Questions.

DrQA Web UI

This is another way of interacting with DrQA.

Installing

DrQA Web UI requires Linux/OSX and Python 3.5 or higher.

  1. Install DrQA
  2. Install dependencies (pip install -r requirements)
  3. Set drqa_data_directory in services\__init__.py to data directory of DrQA
  4. Run (gunicorn --timeout 300 index:app)
  5. Open http://localhost:8000

Screens

HTML Template License

Copyright (c) 2018 by Andre Madarang (https://codepen.io/drehimself/pen/KdXwxR)


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

drqa-webui's People

Contributors

zaghaghi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drqa-webui's Issues

Not working with most recent version of DrQA

I can't seem to get this working on the most recent version of DrQA. when the server is started, it goes through the steps of loading up the DrQA system but gets stuck on the "[ Initializing tokenizers and document retrievers... ]" step. There are no error.

Any help would be appreciated.
Thanks!

cannot start the server

  File "/Users/ajmd/code/gitrep/drqa-webui/index.py", line 5, in <module>
    from services import DrQA, process
  File "/Users/ajmd/code/gitrep/drqa-webui/services/__init__.py", line 49, in <module>
    embedding_file=config['embedding-file'],
  File "/Users/ajmd/code/gitrep/DrQA/drqa/pipeline/drqa.py", line 127, in __init__
    tok_class = tokenizers.get_class(tokenizer)
  File "/Users/ajmd/code/gitrep/DrQA/drqa/tokenizers/__init__.py", line 33, in get_class
    return SpacyTokenizer
NameError: name 'SpacyTokenizer' is not defined

Issue starting server

For some reason the server won't run.
I changed the data directory in services/init.py as well as tokenizer = 'corenlp'
with timeout set to 1000, drqa loads but then an error pops up for the timeout is finished.

`
Process ForkPoolWorker-32:
Traceback (most recent call last):
File "/home/redact/testWebUI/lib/python3.6/site-packages/pexpect/expect.py", line 99, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/home/redact/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 462, in read_nonblocking
raise TIMEOUT('Timeout exceeded.')
pexpect.exceptions.TIMEOUT: Timeout exceeded.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 103, in worker
initializer(*initargs)
File "/home/redact/testWebUI/drqa/pipeline/drqa.py", line 39, in init
PROCESS_TOK = tokenizer_class(**tokenizer_opts)
File "/home/domainproxy/redact/drqa/tokenizers/corenlp_tokenizer.py", line 33, in init
self._launch()
File "/home/redact/testWebUI/drqa/tokenizers/corenlp_tokenizer.py", line 61, in _launch
self.corenlp.expect_exact('NLP>', searchwindowsize=100)
File "/home/redact/testWebUI/lib/python3.6/site-packages/pexpect/spawnbase.py", line 390, in expect_exact
return exp.expect_loop(timeout)
File "/home/domainproxy/redact/lib/python3.6/site-packages/pexpect/expect.py", line 107, in expect_loop
return self.timeout(e)
File "/home/redact/testWebUI/lib/python3.6/site-packages/pexpect/expect.py", line 70, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f9936f446d8>
command: /bin/bash
args: ['/bin/bash']
buffer (last 100 chars): b'0;domainproxy@hostcomp: /redact/webUICode\x07domainproxy@hostcomp:/redact/webUICode$ '
before (last 100 chars): b'0;domainproxy@hostcomp: /redact/webUICode\x07domainproxy@hostcomp:/redact/webUICode$ '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 27958
child_fd: 47
closed: False
timeout: 60
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 100000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_string:
0: "b'NLP>'"
`

Any help is appreciated

Nonetype object is not callable

File "/Users/pelumioladokun/Documents/API/DrQA/WebUI/drqa-webui/index.py", line 5, in <module> from services import DrQA, process File "/Users/pelumioladokun/Documents/API/DrQA/WebUI/drqa-webui/services/__init__.py", line 48, in <module> tokenizer=config['tokenizer'] File "/Users/pelumioladokun/Documents/API/DrQA/DrQA/drqa/pipeline/drqa.py", line 109, in __init__ self.ranker = ranker_class(**ranker_opts) File "/Users/pelumioladokun/Documents/API/DrQA/DrQA/drqa/retriever/tfidf_doc_ranker.py", line 41, in __init__ self.tokenizer = tokenizers.get_class(metadata['tokenizer'])() TypeError: 'NoneType' object is not callable

can't seem to get around this issue, please help I am using Spacy tokenizer

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.