Skip to main content

28 posts tagged with "ai"

View all tags

การสร้าง Chatbot ภาษาไทยด้วย DialogFlow + ThaiMC

· 2 min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

วันนี้ได้มีโอกาสได้ไปพูดเรื่องการสร้าง Chatbot ภาษาไทยที่ที่ทำการสมาคมปัญญาประดิษฐ์ให้น้องๆที่เข้าร่วมงานแข่งขัน AIROBIC 2018 มากกว่า 40 ท่าน งานนี้เป็นงาน AI Hackatron ชิงเงินรางวัลกว่า 800,000 บาท ใครสนใจก็เข้าไปดูได้ที่ http://airobic2018.aiat.or.th ได้เลยจ้า

Poster งานจ้า

งานนี้เลยถือโอกาสอบรมการสร้าง Chatbot ภาษาไทยด้วย DialogFlow แบบว่าครบ ละเอียดครบถ้วน ใช้ครบทุก Function โดยมีเนื้อหาดังนี้

**วิธีการสร้าง Chatbot ภาษาไทย
**(1) Bot Persona
(2) Chat Fuel
(3) DialogFlow
(4) DialogFlow: Intent
(5) DialogFlow: Training Phase
(6) DialogFlow: Response
(7) How DialogFlow Work?: Intent Classification
(8) DialogFlow: Context
(9) How DialogFlow Work?: Context
(10) DialogFlow: Integration with LINE
(11) DialogFlow: Fulfillment with iApp Thai Machine Comprehension (ThaiMC)
(12) DialogFlow: Fulfillment with Inline Editor on Firebase
(13) DialogFlow: How to Debug the Error and Improve the bot.
(14) Q/A

โดย ดร.กอบกฤตย์ วิริยะยุทธกร
Dr. Kobkrit Viriyayudhakorn
iApp Technology Limited (http://iapp.co.th)
kobkrit@iapp.co.th

เชิญรับชมได้เลยจ้า

รับชม Video ได้เลยจ้า

Presentation Slide:

การสร้าง Chatbot ภาษาไทยด้วย DialogFlow + ThaiMCการสร้าง Chatbot ภาษาไทย Dr. Kobkrit Viriyayudhakorn (kobkrit@iapp.co.th)docs.google.com

**Source code for Dialogflow Fulfillment
**https://gist.github.com/kobkrit/cbc8818a6408ea2d56fa48c0ccad1e38

บรรยากาศงาน

หากใครสนใจอยากจะพัฒนาหรือต้องการที่ปรึกษาด้าน AI สามารถเข้าไปดูผลงานของบริษัทเรา iApp Technology ได้ที่ https://iapp.co.th และ https://ai.iapp.co.th หรือติดต่อได้ที่ kobkrit@iapp.co.th ได้เลยนะครับ #Ai #iApp

https://ai.iapp.co.th

ดูเพิ่มเติมได้ที่ https://iapp.co.th และ https://ai.iapp.co.th :D

Trick: How to significantly reduce NPM download time for NodeJS Web application on Docker image

· 2 min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

2

Docker made my life much easier! I put every web application project to its own docker container. Docker allows me to deploy web application server on any cloud or any service providers. We can customize the dependencies to any versions of libraries that we want to use, and also integrated well with any continuous integration tools (like Jenkins).

Docker is excellent, but, the biggest drawback of Docker compared to the traditional FTP upload to server, it requires significant amount of time to complies a docker image. Generally for moderate size of web application project, it takes about 6–8 minutes to produce an image.

Turn out, I found the way to optimize the time to produce an image, especially for NodeJS Web application. Most of docker image compile time is wasted due to NPM install. It contributes 95% of the time. With simple Dockerfile modification, I can reduce from 6 minute to 10 seconds for building an image if the dependencies is not changed.

Instead of writing Dockerfile in the popular format like this.

FROM node:9  
MAINTAINER Kobkrit Viriyayudhakorn (kobkrit@iapp.co.th)RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app/
RUN npm installCMD [ "npm", "start" ]EXPOSE 4000

Change to this.

FROM node:9MAINTAINER Kobkrit Viriyayudhakorn (kobkrit@iapp.co.th)ADD package.json /tmp/package.json  
RUN cd /tmp && npm install
RUN mkdir -p /usr/src/app && cp -a /tmp/node_modules /usr/src/app/WORKDIR /usr/src/app
COPY . /usr/src/app/CMD [ "npm", "start" ]EXPOSE 4000

The key ideas is to change from running npm install every time when your web changes to running only when its dependencies changed. We caches the whole node_modules folder, and save it to a docker commit. If your dependencies are not changed, docker can reuse the old commit for building the new one, significantly saving your docker image building time!

The following are improvement in a real work.

I change to the new Dockerfile on build #6. I changed dependencies on build #8, and #11.

In build #1-#5, I used the first Dockerfile. I changed to the latter on build #6. In build #7, it has no dependencies changed, but in build #8, it has some dependencies change which need to re-run npm install.

[Lecture 1] AI and Deep Learning: Introduction

· One min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

This Lecture Note is a Colaboratory notebook run on Google Cloud Engine. To open it, you need to register to use the Colaboratory service by login with your Google account at https://research.google.com/colaboratory/unregistered.html.

After that, open the Lecture 1 notebook at:
https://drive.google.com/file/d/1Vibvn4m1cdIc8t0QvxQagNkkfQv76F8i/view?usp=sharing

Don’t forget to click at “Open with Colaboratory” at the top bar.

[React Native 14] Startup Pitching

· One min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

This is a bit strange that we are talking about the Startup Pitching in the mobile app development course. But believe me, to success in the mobile app business, you need to know a lot about the business, not only the tech parts. This lecture, I summarized how to make the correct pitching deck. The Pitch deck is the core material that you need to send to your prospect investors to get funded. Moreover, it is the main visualizer to your audiences when you are pitching on the stages in the startup pitching competitions. After that, I summarized the core knowledge about tech startup especially in the Lean Startup that every tech-entrepreneur need to know, which help you save the ton of time in exploring about it by yourself.

[React Native 2] Modern JavaScript Programming language with ES6/ES2015

· One min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

The followings are slide presentation for ITS484: Mobile App Development, SIIT, Thammasat University, Thailand (1/2016)

  1. Walkthrough guides for setup ES6 develop environment in Mac by using Babel
  2. Walkthrough guides setup ESLint to check the JavaScript style guide.
  3. Teach Modern JavaScript programming language (ES6/ES2015)
  4. Teach how to write ES6/ES2015 with correct style guides (be the best practices from day one) based on Airbnb

Source code Git repository: https://github.com/kobkrit/react-native-class-2017

Quiz Submission Form: https://goo.gl/forms/TWoTk9nic5dY2r0F2

Quiz Submission Form Short: http://bit.ly/2kuKvlM

Angular Corousel with Image-Thumbnail

· One min read
Kobkrit Viriyayudhakorn
CEO, iApp Technology

See http://plnkr.co/edit/8TACXGHmMDV4k0O7D6DC?p=preview

We have implemented the corousel with image thumbnail into an AngularJS (Angular version 1) project based on the bootstrap angular-ui library, http://angular-ui.github.io/bootstrap/.

Preview

HTML Code

Slide {{$index}}

{{slide.text}}_P_ _N_ Add SlideInterval, in milliseconds:   

Enter a negative number to stop the interval.

JS Code

angular.module('plunker', ['ui.bootstrap']);  
function CarouselDemoCtrl($scope) {
$scope.myInterval = 5000;
$scope.thumbnailSize = 5;
$scope.thumbnailPage = 1;
var slides = $scope.slides = [];
$scope.addSlide = function(i) {
var newWidth = 600 + slides.length;
slides.push({
image: 'http://placekitten.com/' + newWidth + '/300',
text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' +
['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4],
index: i
});
};
for (var i=0; i<8; i++) {
$scope.addSlide(i);
}

$scope.prevPage = function(){
if ($scope.thumbnailPage > 1){
$scope.thumbnailPage--;
}
$scope.showThumbnails = slides.slice(($scope.thumbnailPage-1)*$scope.thumbnailSize,$scope.thumbnailPage*$scope.thumbnailSize);
}

$scope.nextPage = function(){
if ($scope.thumbnailPage <= Math.floor(slides.length/$scope.thumbnailSize)){
$scope.thumbnailPage++;
}
$scope.showThumbnails = slides.slice(($scope.thumbnailPage-1)*$scope.thumbnailSize,$scope.thumbnailPage*$scope.thumbnailSize);
}

$scope.showThumbnails = slides.slice(($scope.thumbnailPage-1)*$scope.thumbnailSize,$scope.thumbnailPage*$scope.thumbnailSize);
$scope.setActive = function(idx) {
$scope.slides[idx].active=true;
}
}