# Generated by gramex init on 2018-02-28 by Athiban <athibanraj.t@gramener.com>. Please retain this line.
import:
  speech/ui:
    path: $GRAMEXAPPS/ui/gramex.yaml    # Import the UI components
    YAMLURL: $YAMLURL/ui/               # ... at this URL

url:
  speech/home:
    pattern: /$YAMLURL/
    handler: FileHandler
    kwargs:
      path: $YAMLPATH/index.html

  speech/get_answer:
    pattern: /$YAMLURL/get_answer
    handler: FunctionHandler
    kwargs:
      function: speechmodel.get_answer
      headers:
        Content-Type: application/json

  speech/reload:
    pattern: /$YAMLURL/reload
    handler: FunctionHandler
    kwargs:
      function: speechmodel.reload

  speech/suggestion:
    pattern: /$YAMLURL/suggestion
    handler: FunctionHandler
    kwargs:
      function: speechmodel.suggestion
      headers:
        Content-Type: application/json
