rahatzamancse / grid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grid

This repository houses a prototype of the Habitus user interface.

Installation

Implementation consists of two major components. Interaction with the web browser is programmed in JavaScript using React and everything that entails. This code lives in habitus_ui_interface-main/frontend/src. The natural language processing and clustering algorithms are implemented in Python and made accessible with uvicorn. Entrypoints for that code are contained in main2.py which quickly calls out to the backend. Here are some tips on getting all of this installed from a Linux perspective.

  1. git clone https://github.com/Allegra-Cohen/grid
  2. cd grid
  3. sudo apt update
  4. node -v - Check to see that it is installed and version 14+. If so, the next step is not necessary.
  5. sudo apt install nodejs - If the default version for your operating system is not new enough, additional preparations may be needed.
  6. sudo apt install npm
  7. cd habitus_ui_interface-main/frontend
  8. npm install - This will create the node_modules directory.
  9. cd ..
  10. python3 --version - You'll need version 3.9+. If that's already the case, skip the next step.
  11. sudo apt install python3.9 - If this is not available, additional preparations will again be necessary.
  12. pip3 install uvicorn
  13. pip3 install fastapi
  14. pip3 install gensim
  15. pip3 install pandas
  16. pip3 install nltk
  17. pip3 install sklearn
  18. pip3 install spacy
  19. python3 -m spacy download en_core_web_sm
  20. cd backend
  21. python3 control_panel.py - Make sure the console version works before continuing with execution of the networked version.
  22. cd ..

Execution

Error messages resulting from the commands below probably indicate that prerequisites similar to the ones just described are not pre-installed on your computer. Some variation of the commands above will hopefully clear the errors.

  • In the directory habitus_ui_interface-main run python3 -m uvicorn --reload main2:app. This will use port 8000 by default, so to avoid complaints, free up the port before executing the command.
  • In the directory habitus_ui_interface-main/frontend run npm start. This will start a web server on port 3000 and open a browser on http://localhost:3000 where you can observe the user interface.

About


Languages

Language:Python 79.1%Language:JavaScript 18.4%Language:CSS 1.3%Language:HTML 1.1%Language:Shell 0.0%