Human-robot collaboration has been one of the main focuses for both research and usage in advanced manufacturing. In human-robot partnerships, instead of static collaboration for repetitive tasks, it is more significant for the robot to dynamically understand its human partner's intentions and collaborate with them to complete the shared tasks. Motivated by these issues, we develop a model for the robot to learn to complete tasks by watching and analyzing human demonstrations. This allows the robot to become more accurate and customizable with each human's personalized working preference. Based on the long short-term memory method, we propose a new approach to have the robot recognize objects, understand ongoing human actions, and predict human intentions. This will allow the robot to automatically adjust its motions and dynamically pick up and deliver the object to its human partner in the collaborative task. Experimental results suggest that the proposed model can enable robots, like humans, to learn and predict humans' intentions dynamically and intelligently to accommodate customized and personalized collaborative tasks. Future work of this study is also discussed.