File size: 401 Bytes
a47738e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import os
import requests

# Define the path where the input file will be saved
input_file_path = 'input.txt'

# Check if the file already exists. If not, download it.
if not os.path.exists(input_file_path):
    data_url = 'https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt'
    with open(input_file_path, 'w') as f:
        f.write(requests.get(data_url).text)