SinaAhmadi commited on
Commit
e6a3e60
1 Parent(s): 4f3ec12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -32,8 +32,10 @@ languages_scripts = {
32
  "Sindhi in Urdu": "Sindhi-Urdu"
33
  }
34
 
35
- def _translate_data(test_data, language_script):
36
- """Translates given dataset, using parameters from outer scope."""
 
 
37
  cfg_file = './models/%s/config.yaml'
38
  ckpt = "./models/%s/best.ckpt"%languages_scripts[language_script]
39
 
@@ -93,14 +95,6 @@ def _translate_data(test_data, language_script):
93
  )
94
  return hypotheses[0]
95
 
96
-
97
-
98
- def normalize(text, language_script):
99
- test_data.set_item(text)
100
- result = _translate_data(test_data, language_script)
101
- return result
102
-
103
-
104
  title = "Script Normalization for Unconventional Writing"
105
 
106
  description = """
 
32
  "Sindhi in Urdu": "Sindhi-Urdu"
33
  }
34
 
35
+ def normalize(text, language_script):
36
+
37
+ test_data.set_item(text)
38
+
39
  cfg_file = './models/%s/config.yaml'
40
  ckpt = "./models/%s/best.ckpt"%languages_scripts[language_script]
41
 
 
95
  )
96
  return hypotheses[0]
97
 
 
 
 
 
 
 
 
 
98
  title = "Script Normalization for Unconventional Writing"
99
 
100
  description = """