Skip to content

rssanjeev/persuasionToolWebsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the Persuasion Tool Website developed by Trent for BITSLAB.

  • app

    • main

      • views.py
        • Handling almost all the backend events with flask framework.
        • Contains all the view function, is the most important file in this project handling the backend logic.
      • tool.py
        • Using machine learning libraries to calculate persuasion, it has a "gettingFeatures" function used to get the given features of a statement.
      • init.py
        • A file used in larger flask project, to make the project structure more clear, in this project, it is used by blueprint. Blueprint is used to organize a big flask project.
      • MLmodels
        • Contains all machine learning models used by this website.
    • static

      • Contains all the static file in a flask project, including .css, .js and so on. All the files contained in this project could be accessed by any user.
      • download
        • Contains all the data exported from database. After clicking 'export' button, all the data in the remote PostgreSQL database would be written into a .csv file in this project, then send to user.
    • templates

      • Contains all .html files for the website.
    • init.py

      • A file needed by blueprint for the "app" layer in this project.
    • config.py

      • Contains the configurations for flask framework.
      • Basic config added in Config class, configurations for development added in DevelopmentConfig class, configurations for production added in ProductionConfig. Values in Config would be covered by the same variable in DevelopmentConfig and ProductionConfig which inherits Config.
    • models.py

      • A file for SQLAlchemy, define all of the object models for database.
  • migrations

    • Auto generated by running manage.py, used for database migration.
  • manage.py

    • This file is used for database migration.
    • After deployed, any change made to database models, should run this file to map changes in models to the remote database.
    • Useful operations:
      • python3 manage.py db init -> used to create the menu structure for migrations dir, only need to run it the first time construct the dir
      • python3 manage.py db migrate -> migrate changes
      • python3 manage.py db upgrade -> map to remote
  • nltk.txt

    • Specify all of the dependency of nltk, which would be loaded when the app sets up.
  • Procfile

    • A file needed by Heroku, tell Heroku how to start you app.
  • requirements.txt

    • A file needed by Heroku, contains all the python libs this app depends on. In this file, there are some redundant dependencies cause I didn't enable a virtual environment in this project, it's better to have one.
  • run.py

    • A file used to run this app for development, not needed in the production environment.
  • frequently used commands

    • git push heroku master
    • heroku open
    • heroku logs

About

Persuasion Tool Website developed by Trent for BITSLAB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published