Skip to content

abhi-bhatra/text-translator-Azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Translator App

Creating a web application with artificial intelligence (AI) doesn't need to involve a lot of code or creating services from scratch. Let's imagine we wanted to create a website that can translate text for the user.

For the front end, we want something that will allow us to integrate our services without having to jump through a lot of hoops. A framework like Flask is a perfect choice. Flask is described by its creators as a "micro-framework", meaning it provides the core services required, such as routing and templating, but otherwise allows you to use whatever backend services your application needs. It's also lightweight, making it quick to set up and deploy. We don't need a database or anything fancy. We just need a framework to create our UI, and be able to call the back-end service.

image

Steps

  • Create a Flask application
  • Create a Translator service on Azure
  • Use requests to call the service

WebApp Flow

Setup your environment Install the necessary tooling, create the folder for their project, and setup the necessary Python libraries.

Directory Tree

image

Create the app After setting up the environment, create the template for the landing page and test that application is running correctly.

Create the Translator service Once the project is up and running, create the necessary services on Azure. Obtain the keys to call the service, and properly store them in a .env file.

Call the service from the app Add the code to call the Translator service. Test the application and seeing text translated in their app!

image

Access the application at: https://texttransalator.azurewebsites.net/

Link might not work due to collapse of Azure subscription, but you can clone this repository and host the application on your Azure subscription to make it work