Giter VIP home page Giter VIP logo

streamlit_demo_cemantix's Introduction

UI for ML models

Goal : reproduce a cemantix

to reproduce : https://cemantix.certitudes.org/

Installation

  1. Install a venv : see creation of venv
pip install virtualenv
virtualenv venv
  1. Activate the environment

On Windows : .\venv\Scripts\activate
Note : on linux path can change

  1. Install requirements in the venv (1 by 1 or using requirements file)

Libraries :

  • streamlit : pip install streamlit
  • plotly: pip install plotly
  • pandas: pip install pandas
  • scikit-learn: pip install scikit-learn
  • python-dotenv: pip install python-dotenv
  • pytest: pip install pytest
  • opencv : pip install opencv-python

or

pip install -r resources/install/requirements.txt

Note :

  1. Download the word2vec model :

https://drive.google.com/file/d/1cUoBrCodYuF401eDJcAKRC9DjlJVMZWd/view?usp=sharing

Launch on windows

streamlit run .\app.py

Normally a browser will open (or the adress will be displayed)

Work to do

Features :

  • create the main UI having two tabs
  • create the UI tab to find the word
  • create the UI tab to discover the wikipedia page
  • collaborate using git

inspiration :

Streamlit resources :

Word2vec resources :

Some gits command

Most used commands :

  • clone repo : git clone
  • add remote git remote add origin <PATH of .git>
  • create branch git checkout -b newbranch
  • change branch git checkout master
  • add all files : git add .
  • create commit + commentary : git commit -m "some commit"
  • push to remote : git push origin some_remote_branch
  • get modifications and try to merge : git pull

Other commands :

  • get modif without merging : git fetch
  • show changes : git diff
  • merge branch featureA into current : git merge featureA
  • commit when forgot smthg : git commit --amend --no-edit

Notes on widgets

doc : https://docs.streamlit.io/library/api-reference/session-state

  • var = st.checkbox() if we want to store result of checkbox in python variable
  • st.checkbox(on_change=somefunc) if we want to trigger a callback
  • st.checkbox(key=somename) if we want to reference it later using st.session_state.somename
  • python UI page is run once each time a widget changes
  • if there is a while true loop in the page, than widget will update but not variables in python because script will not finish

streamlit_demo_cemantix's People

Contributors

aravanel avatar avranasa avatar giulio98 avatar jdeantonio02 avatar

Watchers

rodrigo avatar Nicolas Hauviller avatar  avatar  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.