Coder Social home page Coder Social logo

nzwang / text2brain_server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sabunculab/text2brain_server

0.0 0.0 0.0 1.85 MB

Webserver of text2brain for predicting brain activation maps from free-form text query

Home Page: https://braininterpreter.com/

License: MIT License

JavaScript 24.99% Python 34.70% CSS 18.80% HTML 21.50%

text2brain_server's Introduction

Text2Brain Web Server

brain interpreter preview

A webpage that deploys Text2Brain model for predicting brain activation maps from free-form text query. The webpage is built with Flask + SQLite + AngularJS + Redis + RQ.


Broad picture

The setup is largely similar to this RealPython tutorial (we highly recommend going through this tutorial). Essentially there are two main python files, app.py is the Flask web server and worker.py performs the inference. app.py receives input query, which is then passed to a job that is queued by Redis and run in the background by worker.py without interfering with new web requests.


How to run

Requirements:

  • Install virtualenv and install python 3.6.14
  • Create a virtual environment with venv and install packages under requirements.txt
  • Install sqlite
  • Install redis
  • Download checkpoints from Google Drive and do tar -xzvf text2brain_checkpoint.tar.gz
  • Download uncased SciBert pretrained model from AllenAI S3 and unzip into scibert_scivocab_uncased directory

How to run locally in debug mode:

  • Set the environment variables required by config.py
  • Initialize the database from app import db; db.create_all()
  • Run the worker python worker.py
  • Run the web server on another terminal window/tab python app.py

Bugs and Questions

Please contact Gia at [email protected]

text2brain_server's People

Contributors

ngohgia avatar mnhng avatar dependabot[bot] 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.