ion`, { // Replace with your API endpoint
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ text }),
  })
  .then(response => response.json())
  .then(data => {
    console.log('Emotion detection result:', data);
    // Handle success, e.g., display detected emotion
  })
  .catch(error => {
    console.error('Emotion detection error:', error);
    // Handle error, e.g., show an error message
  });
}

//Detect Language of Text
function detectLangua