jflo commited on
Commit
835b42d
1 Parent(s): 43d9608

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,6 +14,7 @@ all_categories = ['Arabic','Chinese','Czech','Dutch','English','French','German'
14
  'Irish','Italian','Japanese','Korean','Polish','Portuguese','Russian','Scottish',
15
  'Spanish','Vietnamese']
16
 
 
17
  def unicodeToAscii(s):
18
  return ''.join(
19
  c for c in unicodedata.normalize('NFD', s)
@@ -40,7 +41,7 @@ class RNN(nn.Module):
40
  def __init__(self, input_size, hidden_size, output_size):
41
  '''
42
  :param input_size: number of input coming in
43
- :param hidden_size: number of he hidden units
44
  :param output_size: size of the output
45
  '''
46
  super(RNN, self).__init__()
 
14
  'Irish','Italian','Japanese','Korean','Polish','Portuguese','Russian','Scottish',
15
  'Spanish','Vietnamese']
16
 
17
+ # Turn a Unicode string to plain ASCII, thanks to https://stackoverflow.com/a/518232/2809427
18
  def unicodeToAscii(s):
19
  return ''.join(
20
  c for c in unicodedata.normalize('NFD', s)
 
41
  def __init__(self, input_size, hidden_size, output_size):
42
  '''
43
  :param input_size: number of input coming in
44
+ :param hidden_size: number of hidden units
45
  :param output_size: size of the output
46
  '''
47
  super(RNN, self).__init__()