Giter VIP home page Giter VIP logo

qna-bot's Introduction

QnA Bot

This repository contains sample code for my session "Build a FAQ bot with deeplearning4J" Feel free to clone this repository and modify the code.

Bot demo

Quickstart

Before you can use the code, please follow these steps to set everything up.

  1. Clone the repository https://github.com/Microsoft/botbuilder-java to disk
  2. Open a terminal and navigate to the repository
  3. Run the command mvn install to install the botbuilder SDK for Java
  4. Clone the repository https://github.com/wmeints/qna-bot to disk
  5. Using your terminal, navigate to the repository qna-bot
  6. Run mvn clean compile to check if the code compiles

Train the model

This project relies on a FAQ model that you need to train first. Follow these steps to train the model:

  1. Edit the questions and answers file in ./data you can refer to answers by the unique index for the answer.
  2. Package the training application by running mvn package
  3. Execute the training application with java -jar training/target/training-1.0-SNAPSHOT.jar

Please be aware The process of training a model may take a lot of time, depending on your machine. Also note that you need CUDA 9 and a CUDA capable graphics card.

Deploy the code

This code runs on top of tomcat 9. You need to install Tomcat on your computer first. You can get a copy over at https://tomcat.apache.org/download-90.cgi.

Follow these steps to deploy the application:

  1. Run mvn package in the service project folder to package the project as a WAR file.
  2. Copy the war file from target/ to the webapps folder in the tomcat install folder.
  3. Start tomcat with bin/catalina.sh run or bin/catalina.bat start if you work on Windows.

The app should now be available under http://localhost:8080/qnabot

Configure the Microsoft Bot Emulator to point to http://localhost:8080/qnabot/api/messages for the bot endpoint. You can leave the appId and password setting empty.

qna-bot's People

Contributors

wmeints avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.