Car Price Predictor - Azure ML + Power App Solution
This repo provides the required Power App and Power Automate solution and step by step instructions required to complete the example deployment detailed in the "Enabling Citizen AI with the Power Platform and Azure" reference architecture.
Deploy this scenario
To deploy this end to end example, you must:
- Follow this Azure ML tutorial to quickly train an ML model to predict the price of a car based on a range of input features and deploy it as a real time REST endpoint.
- In Azure ML, navigate to Endpoints -> Realtime Endpoints and drill down on the one you just created in the previous step. Copy REST Endpoint ending in /score and navigate to the ‘Consume’ pane and copy one of the “Authentication Key”
- Download the sample Car Price Predictor - Power App and Power Automate solution that you can reuse and customize as required in your own environment. This is a Power Platform solution package file. Learn more about Solution packages: Solutions in Power Apps - Power Apps | Microsoft Docs.
- Go to the Power Apps Maker portal and sign in using your credentials. If you do not have an existing Power Apps subscription, you can sign up for a trial subscription or use a Developer Plan.
- In the Power Apps Maker portal, select your target environment to deploy the solution package. It is recommended to deploy on an Environment designated for learning or development/test purpose.
- Once you have selected your Environment, click on “Solutions” on the left blade to get to the Solutions page. Click “Import”.
- Select your downloaded solution zip file and click “Next”.
- Review the import summary. Click on “Import” to complete the import process.
- Once import is successful, you should see the solution “AML PowerApps CarPrice Sample” installed.
- Click on the Solution display name “AML PowerApps CarPrice Sample” to open the solution. Here you will find two assets – a Power Automate Cloud Flow named “CarPricePredictionFlow” and a Power Apps Canvas app named “Car Price Predictor”.
- Next, we will need to update the AML End Point URL and Authentication key for our solution. Select the context menu for CarPricePredictionFlow (click on the ellipsis) and select “Edit”. This will now launch Power Automate editor.
- In Power Automate, expand the steps “ML API Key” and “ML Endpoint”. Paste the Authentication Key and the REST end point URL copied from step (2) above, into the “Value” fields respectively. Make sure the URL includes /score at the end. Click “Save”.
- You may now close Power Automate. From the Power Apps Maker portal, click on “Apps”. You should see the Car Price Predictor app installed. Click on it to launch the app.
- Select a car make and change the values in the calculator screen, then click “Predict”. This will invoke the Cloud Flow, which calls the REST end point to the car price predictor in Azure ML and returns the value back to the app.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.