Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.55 KB

README.md

File metadata and controls

44 lines (37 loc) · 1.55 KB

UI5 Machine Translation

Overview

SAP UI5 translation app powered by SAP Leonardo Machine Learning API.

App screenshot

To translate a text:

  1. Type a text in English on the left box.
  2. Select a target language from the dropdown on the right.
  3. Click the button [ Translate ].
  4. See the translated text on the right.

Prerequisites

Instructions

Create ML API destination on SCP

To connect SAP Cloud Platform to the SAP API's sandbox system, you need to create a destination on your account.

  1. Open the SAP Cloud Platform Cockpit.
  2. Navigate to the Destinations page.
  3. Add a new entry with the following parameters:
    • Name: sapui5ml-api
    • Type: HTTP
    • Description: SAP Leonardo Machine Learning APIs
    • URL: https://sandbox.api.sap.com/ml
    • Proxy Type: Internet
    • Authentication: NoAuthentication
    • Additional parameters:
      • WebIDEEnabled = true
  4. Mark the checkbox "Use default JDK truststore".
  5. Click [Save].

Service Authentication (API key)

In order to consume the SAP API service, you may provide an API key for authentication and parse it on the requests' header.

  1. Go to the Translation service official page to obtain your API key.
  2. Create a file onto the folder /webapp/model called ml-api.json.
  3. Paste the following content into the new file:
{
  "APIKey":"<<< YOUR_API_KEY >>>"
}