ondovb commited on
Commit
1ec8ae9
1 Parent(s): f440398

sleep between requests

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. requirements.txt +1 -0
app.py CHANGED
@@ -16,6 +16,7 @@ import urllib.request
16
  from string import punctuation
17
  from math import log,exp,sqrt
18
  import random
 
19
 
20
  nltk.download('stopwords')
21
  nltk.download('gutenberg')
@@ -23,7 +24,9 @@ nltk.download('gutenberg')
23
  cos = T.nn.CosineSimilarity(dim=0)
24
 
25
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/dict-info.txt")
 
26
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/dict-unix.txt")
 
27
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/profanity.json")
28
 
29
  #gdown.download('https://drive.google.com/uc?id=16j6oQbqIUfdY1kMFOonXVDdG7A0C6CXD&confirm=t',use_cookies=True)
 
16
  from string import punctuation
17
  from math import log,exp,sqrt
18
  import random
19
+ from time import sleep
20
 
21
  nltk.download('stopwords')
22
  nltk.download('gutenberg')
 
24
  cos = T.nn.CosineSimilarity(dim=0)
25
 
26
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/dict-info.txt")
27
+ sleep(1)
28
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/dict-unix.txt")
29
+ sleep(1)
30
  urllib.request.urlretrieve("https://github.com/ondovb/nCloze/raw/1b57ab719c367c070aeba8a53e71a536ce105091/profanity.json")
31
 
32
  #gdown.download('https://drive.google.com/uc?id=16j6oQbqIUfdY1kMFOonXVDdG7A0C6CXD&confirm=t',use_cookies=True)
requirements.txt CHANGED
@@ -6,3 +6,4 @@ numpy
6
  stanza
7
  pandas
8
  urllib
 
 
6
  stanza
7
  pandas
8
  urllib
9
+ time