Commit 3b1b04e5b56393dfafe9a7a37d3ffc662ce3b72f
1 parent
ffdbfb7e
Exists in
devel
Altera parametro 'type' do endpoint '/translate' para 'platform'
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/TranslationServer.py
@@ -133,13 +133,13 @@ def load_statistics_page(): | @@ -133,13 +133,13 @@ def load_statistics_page(): | ||
133 | @check_run_mode | 133 | @check_run_mode |
134 | def get_sign(): | 134 | def get_sign(): |
135 | sign_name = request.args.get('name').encode("UTF-8").upper() | 135 | sign_name = request.args.get('name').encode("UTF-8").upper() |
136 | - sign_type = request.args.get('type').encode("UTF-8").upper() | 136 | + sign_type = request.args.get('platform').encode("UTF-8").upper() |
137 | return check_sign(sign_name, sign_type) | 137 | return check_sign(sign_name, sign_type) |
138 | 138 | ||
139 | if __name__ == "__main__": | 139 | if __name__ == "__main__": |
140 | parser = argparse.ArgumentParser(description='Translation server and signs download for VLibras.') | 140 | parser = argparse.ArgumentParser(description='Translation server and signs download for VLibras.') |
141 | parser.add_argument('--port', help='Port where the server will be available.', default=3000) | 141 | parser.add_argument('--port', help='Port where the server will be available.', default=3000) |
142 | - parser.add_argument("--mode", help="So that the server will work.", default="translate") | 142 | + parser.add_argument("--mode", help="So that the server will work.", choices=['translate','dict','full'], default="translate") |
143 | args = parser.parse_args() | 143 | args = parser.parse_args() |
144 | init_mode(args) | 144 | init_mode(args) |
145 | app.run(host="0.0.0.0", port=int(args.port), threaded=True, debug=False) | 145 | app.run(host="0.0.0.0", port=int(args.port), threaded=True, debug=False) |
146 | \ No newline at end of file | 146 | \ No newline at end of file |