Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from "react";
import ReactDOM from "react-dom";
import Amplify from "aws-amplify";
import { AmazonAIPredictionsProvider } from "@aws-amplify/predictions";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import "normalize.css/normalize.css";
import "./index.css";
import amplifyConfig from "./aws-exports";
Amplify.configure(amplifyConfig);
Amplify.addPluggable(new AmazonAIPredictionsProvider());
ReactDOM.render(, document.getElementById("root"));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
fr: "Chantal",
hi: "Aditi",
it: "Carla",
ja: "Mizuki",
ko: "Seoyeon",
no: "Liv",
pl: "Ewa",
pt: "Vitoria",
ru: "Tatyana",
es: "Penelope",
sv: "Astrid",
tr: "Filiz"
}
Amplify.configure(config);
Amplify.addPluggable(new AmazonAIPredictionsProvider());
let source = null
console.log('loaded...');
function interpretFromPredictions(textToInterpret) {
Predictions.interpret({
text: {
source: {
text: textToInterpret,
},
type: "ALL"
}
}).then(result => {
const language = result.textInterpretation.language
const translationLangugage = state.getLanguage()
import React, { Component } from 'react';
import './App.css';
import { Switch, Route } from 'react-router-dom'
import Polly from './components/Polly';
import Transcribe from './components/Transcribe';
import Main from './components/Main';
import Comprehend from './components/Comprehend';
import Rekognition from './components/Rekognition';
import Translate from './components/Translate';
import Amplify from '@aws-amplify/core';
import { AmazonAIPredictionsProvider } from '@aws-amplify/predictions';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
Amplify.addPluggable(new AmazonAIPredictionsProvider());
class App extends Component {
render() {
return (
)
}
}