Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shrutisangwan07/flask-text-translator-main
https://github.com/shrutisangwan07/flask-text-translator-main
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shrutisangwan07/flask-text-translator-main
- Owner: ShrutiSangwan07
- Created: 2024-07-06T09:15:28.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-06T09:24:03.000Z (4 months ago)
- Last Synced: 2024-07-06T10:35:06.391Z (4 months ago)
- Language: HTML
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build an AI web app to translate text with Flask
## Learn module
[Build an AI web app by using Python and Flask](https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app/?WT.mc_id=academic-56258-chrhar)
## Goals
We will discuss using a Cognitive Service to access text translation in a web app.
| **Goal** | Description |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **What will you learn** | How to create a Flask application, create a Translator service on Azure, and use requests to call the service. |
| **What you'll need** | [Python](https://docs.microsoft.com/learn/modules/python-install-vscode/?WT.mc_id=academic-56258-chrhar) and [Visual Studio Code](https://code.visualstudio.com?WT.mc_id=academic-56258-chrhar) | |## Prerequisites
- [Python](https://docs.microsoft.com/learn/modules/python-install-vscode/?WT.mc_id=academic-56258-chrhar)
- [Visual Studio Code](https://code.visualstudio.com?WT.mc_id=academic-56258-chrhar)Have you ever wanted to incorporate artificial intelligence into a website? Do you want to be able to translate text in your web apps? With Cognitive Services and Flask you can create a website to translate text with a small amount of code.
## Workflow
### Setup your environment
Start by configuring their environments (https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app/1-exercise-set-up-environment?WT.mc_id=academic-56258-chrhar). Install the necessary tooling, create the folder for your project, and set up the necessary Python libraries.
### Create the app
After setting up the environment, create the project (https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app/3-exercise-create-app?WT.mc_id=academic-56258-chrhar). Create the template for the landing page and test your application is running correctly.
### Create the Translator service
Once the project is up and running, create the necessary services on Azure (https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app/5-exercise-create-translator-service?WT.mc_id=academic-56258-chrhar). obtain the necessary keys to call the service, and properly store them in a **.env** file.
### Call the service from the app
Now add the code to call the Translator service (https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app/6-exercise-call-translator?WT.mc_id=academic-56258-chrhar). TFinish by testing your application and seeing text translated in their app!
## Practice
Now that you know how to make a web app that can translate text, what other apps can you build? Think of a use case for these translations and see how you can enhance this app. Can you add a voice element to the app, so that you can speak into a microphone, have it transcribed, and then translated using the dropdown?