Giter Club home page Giter Club logo

workbc-helpbot's Introduction

WorkBC API

Setting Up Your Environment

You can edit and run the file in visual studio, however I reccomend Pycharm community,
it allows you to use the pyhton console as well so you can replicate the api requests.
it can be found here: https://www.jetbrains.com/pycharm/download/#section=windows 

Cloning Your Repo

open your Command prompt, or powershell and navigate to where you'd like
your repo to be held (i.e. User/username/gitProjects/) from here you can run the command: 

    git clone https://github.com/bcgov-elmsd/workbc-helpbot.git

Open and Run Code

Open Visual Studio or Pycharm which you installed when setting up your environment and
open your workbc-helpbot project. in the terminal your going to need to ensure you're 
running atleast python 3.7  you can check using python --version. You will also need pip
to execute the following command:
    
    pip install -r requirements.txt

Once those modules are installed you can run:
   
   python train_chatbot.py

to create the h5 and pkl files for the chatapp.py script.
Note: you will see some error messages, they can be ignored they're not neccessary
to run the script. 
now you can either run:
   
   python chatgui.py
        or
    python App.py
 
the chatgui.py will open a gui for you to test the AI's responses,
the app.py will run the api which you can test either in at http://127.0.0.1:5000/
by adding a phrase or word to the end i.e. http://127.0.0.1:5000/en/thank%20you which will show
the response on the webpage. or you can use the python console using the request:
   
   requests.get("http://localhost:5000/en/Thanks").text
        or
    r = requests.get("http://localhost:5000/en/Thanks")
    r.text

Code References

image

Using Git Command-line

When editing the project use your own branch, you can create a new branch by using  the command:

    git checkout -b newBranch

this will automatically replicate your project and put you on your new branch called "newBranch".
To commit your local work to your remote branch you can need to first save your changes locally 
then add your changes to your commit using one of the following commands:

    // this adds all of the files you've changed
    git add -A  
    
    // will add the file specified to your commit
    git add filename

to commit the file you've added you can either create a large or small note using one of the two commands:

    // when submitting a small message about your commit contents
    git commit -m "This is my commit message"   

    // when submitting a detailed message about your commit
    git commit
    // this will open your vim editor so you can create a larger commit message.

finally to push your commit to your remote branch you use the following command:

    git push origin newBranch

This will push your changes to your remote branch and if you'd like to merge it with the master 
or main branch you can visit the https://github.com/bcgov-elmsd/workbc-helpbot repo and create a 
"new pull request" for the members to review and approve.

If you're ever locally your branch does not auto update so it you want the latest version of the project you can use the command:

    git pull origin main

Some more references for git:

    cheat sheet - https://education.github.com/git-cheat-sheet-education.pdf
    Common git issues - https://www.codementor.io/@citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd

License

    Copyright 2020 Province of British Columbia

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

workbc-helpbot's People

Contributors

davidokulski avatar mehmetvural avatar rafasdc avatar whitneydluhosh avatar

Watchers

 avatar  avatar  avatar

workbc-helpbot's Issues

Add project lifecycle badge

No Project Lifecycle Badge found in your readme!

Hello! I scanned your readme and could not find a project lifecycle badge. A project lifecycle badge will provide contributors to your project as well as other stakeholders (platform services, executive) insight into the lifecycle of your repository.

What is a Project Lifecycle Badge?

It is a simple image that neatly describes your project's stage in its lifecycle. More information can be found in the project lifecycle badges documentation.

What do I need to do?

I suggest you make a PR into your README.md and add a project lifecycle badge near the top where it is easy for your users to pick it up :). Once it is merged feel free to close this issue. I will not open up a new one :)

It's Been a While Since This Repository has Been Updated

This issue is a kind reminder that your repository has been inactive for 181 days. Some repositories are maintained in accordance with business requirements that infrequently change thus appearing inactive, and some repositories are inactive because they are unmaintained.

To help differentiate products that are unmaintained from products that do not require frequent maintenance, repomountie will open an issue whenever a repository has not been updated in 180 days.

  • If this product is being actively maintained, please close this issue.
  • If this repository isn't being actively maintained anymore, please archive this repository. Also, for bonus points, please add a dormant or retired life cycle badge.

Thank you for your help ensuring effective governance of our open-source ecosystem!

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.