파이썬 딥러닝 ai 스쿨 기초/lecture10 3

lecture10 2교시 RNN 언어 모델링

다음 character 예측 import tensorflow as tf import numpy as np from tensorflow.contrib import rnn sentence = ("if you want to build a ship, don't drum up people together to " "collect wood and don't assign them tasks and work, but rather " "teach them to long for the endless immensity of the sea.") # 딕셔너리 생성 char_set = list(set(sentence)) char_dic = {w: i for i, w in enumerate(char_set)} print(char_..

lecture10 0교시 youtube 영상 크롤링

from pytube import YouTube import os import json def cln_txt(txt): return txt.replace('-', '').replace(' ', '_').replace('/', '~').replace('(', '').replace(')', '').replace('|','').replace('\\', '') def download_data(url, v_type='video/mp4', res=['1080p', '720p']): crawl_result = {'url': url} # url 딕셔너리 생성 yt = YouTube(url) # 영상정보 저장 streams = yt.streams # 스트림 crawl_result['title'] = yt.title # ..