Git Product home page Git Product logo

aischooltutorials's Introduction

AI School Tutorials

This repository contains a collection of AI tutorials that are featured on Microsoft AI School.

See how Azure Custom Vision can create a model that takes a hand drawn wireframe and turns it into valid HTML code.

Apply Azure Cognitive Services to gain intelligent insights within a screen capture application.

Other Labs

You can find other AI Labs in this Github repo.

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.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., label, 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.

aischooltutorials's People

Contributors

gsegares avatar jamiewilbraham avatar kagigz avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar sethreidnz avatar vatz88 avatar ztsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aischooltutorials's Issues

Exception while executing function: detection -> No valid combination of account information found

Hi Followed all the steps @ https://aischool.microsoft.com/en-us/services/learning-paths/sketch2code/sketch2code-lab,

but while testing getting the below error -- Please help

d.","errorDetails":"Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: detection ---> System.FormatException : No valid combination of account information found.\r\n at Microsoft.WindowsAzure.Storage.CloudStorageAccount.b__0(String err)\r\n at Microsoft.WindowsAzure.Storage.CloudStorageAccount.ParseImpl(String connectionString,CloudStorageAccount& accountInformation,Action1 error)\r\n at Microsoft.WindowsAzure.Storage.CloudStorageAccount.Parse(String connectionString)\r\n at Sketch2Code.Core.ObjectDetectionAppService..ctor(ObjectDetector detectorClient,ILogger logger) at D:\\WSTemp\\AISchoolTutorials-master-old\\sketch2code\\Sketch2Code.Core\\Services\\ObjectDetectionAppService.cs : 35\r\n at Sketch2Code.Core.ObjectDetectionAppService..ctor() at D:\\WSTemp\\AISchoolTutorials-master-old\\sketch2code\\Sketch2Code.Core\\Services\\ObjectDetectionAppService.cs : 38\r\n at async Sketch2Code.Api.ObjectDetection.Run(HttpRequestMessage req,TraceWriter log)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2.InvokeAsync[TReflected,TReturnValue](Object instance,Object[] arguments)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker,ParameterHelper parameterHelper,CancellationTokenSource timeoutTokenSource,CancellationTokenSource functionCancellationTokenSource,Boolean throwOnTimeout,TimeSpan timerInterval,IFunctionInstance instance)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) \r\n End of inner exception\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken)\r\n at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw()\r\n at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??)\r\n at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary2 arguments,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??)\r\n at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func3 processRequestHandler,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken)\r\n at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)"}
D:\WSTemp\AISchoolTutorials-master-old\sketch2code\model>

Feedback on the tutorial

Hi,

I have several comments regarding this tutorial:

There's no local.settings.json file.

In the "Create the orchestrator Azure Function/Configure the app to use Custom Vision" section, it says "open the local.settings.json in the root of the Sketch2Code.Api project" but it is in the git ignore so there's no file.

I was able to test the function by using Azure CLI and calling the
func azure functionapp fetch-app-settings <name>
command to create the file, then adding the properties mentioned in the tutorial.

I think the local.settings.json file should be added in the project.

There is no indication on how to test with Powershell.

I replaced the command curl with curl.exe to make it work.

I think it's worth mentioning in the tutorial.

App Function endpoint is not clear.

In the "Run the Sketch2Code app/Update App Settings" section, it says "Make sure that the Sketch2CodeAppFunctionEndPoint property has the correct function endpoint URL that you use before to call the function", which in my opinion isn't very clear.

Personally, I couldn't make the web app work - I tried with 2 endpoints, including the "http://localhost:7071/api/detection" one (with the Azure Function up and running), but when I try uploading a picture I get a message "Host lock lease acquired by instance ID XXXX..." and there's no result.

Hope this feedback will help improve the tutorial which is otherwise really great.

Problem with some names.

Hi there,

I'm following your tutorial for JFK Files but I'm stuck in the step in which I create a custom Cognitive Skill.

You provided the following code for the function method "RunCryptonymLinker":

    [FunctionName("link-cryptonyms")]
    public static IActionResult RunCryptonymLinker([HttpTrigger(AuthorizationLevel.Function, "post", Route = null)]HttpRequest req, TraceWriter log, ExecutionContext executionContext)
    {
        string skillName = executionContext.FunctionName;

        // Get the batch of input records from the request
        var requestRecords = WebApiSkillHelpers.GetRequestRecords(req);
        if (requestRecords == null)
        {
            return new BadRequestObjectResult($"{skillName} - Invalid request record array.");
        }

        // Process each record and set the cryptonym to the output if found
        WebApiSkillResponse response = WebApiSkillHelpers.ProcessRequestRecords(skillName, requestRecords,
            (inRecord, outRecord) => {
                string word = inRecord.Data["word"] as string;
                if (word.All(Char.IsUpper) && cryptonymLinker.Cryptonyms.TryGetValue(word, out string description))
                {
                    outRecord.Data["cryptonym"] = new { value = word, description };
                }
                return outRecord;
            });

        return (ActionResult)new OkObjectResult(response);
    }

But Visual Studio says that the name cryptonnymLinker doesn't exist in the current context and the name description is used but unnassigned.

I'm very new in C# (I come from Java world) and I'm not sure how to solve it without breaking other components that I still don't understand. Following exactly your steps ends with no way to build the solution. I recommend to update the tutorial or the provided source code.

Regards.

unauthorized program.cs:line 29 error dotnet run

C:\Users\saurabh.sinha\Downloads\AISchoolTutorials-master\AISchoolTutorials-master\sketch2code\Import>dotnet run

Unhandled Exception: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'Unauthorized'
at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApi.GetDomainsWithHttpMessagesAsync(Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApiExtensions.GetDomainsAsync(ITrainingApi operations, CancellationToken cancellationToken)
at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApiExtensions.GetDomains(ITrainingApi operations)
at Import.Program.Main(String[] args) in C:\Users\saurabh.sinha\Downloads\AISchoolTutorials-master\AISchoolTutorials-master\sketch2code\Import\Program.cs:line 29

Error when running Training.py

Traceback (most recent call last):
File "training.py", line 6, in
EncTrainer.train()
File "/data/pix2story-lab/source/training/train_encoder.py", line 40, in train
trainer(self.text, self.training_options)
File "/data/pix2story-lab/source/skipthoughts_vectors/training/train.py", line 139, in trainer
for x, y, z in train_iter:
File "/data/pix2story-lab/source/skipthoughts_vectors/training/homogeneous_data.py", line 49, in next
if self.len_curr_counts[self.len_unique[self.len_idx]] > 0:
IndexError: index 0 is out of bounds for axis 0 with size 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.