0
$\begingroup$

I developed the following code which is suitable for cloud deployment. However, in order to avoid the problems of the cloud, I would like to create an user interface that runs in a Mathematica notebook. How could I do that?

My code is as follows:

dobermann = 
  {-> "Dobermann", -> "Dobermann", -> "Dobermann", -> "Dobermann", -> "Dobermann"};
rottweiler = 
  {-> "Rottweiler", -> "Rottweiler", -> "Rottweiler", -> "Rottweiler", -> "Rottweiler"};
alano = 
  {-> "Alano", -> "Alano", -> "Alano", -> "Alano", -> "Alano"};
labrador = 
  {-> "Labrador", -> "Labrador", -> "Labrador", -> "Labrador", -> "Labrador" };
husky = 
  {-> "Husky", -> "Husky", -> "Husky", -> "Husky", -> "Husky" };

dogTypeSet = {dobermann, rottweiler, alano, labrador, husky};
class = Classify[Flatten[{dobermann, rottweiler, alano, labrador, husky}]];

CloudDeploy[
  FormPage[
    "image" -> "Image", 
    Column[{#image, "This is a " <> ToString[class[#image]]}] &, 
    AppearanceRules -> 
      <|"Title" -> "What dog is that?", 
        "Description" -> "Enter an image of a dog and I'll tell you what it is", 
        "SubmitLabel" -> "Classify"|>, PageTheme -> "Blue"], 
  Permissions -> "Public"]
$\endgroup$
  • $\begingroup$ Possible duplicate of Issue deploying a FormPage using Classify $\endgroup$ – Niki Estner Jan 9 at 19:32
  • $\begingroup$ I asked this question in a comment on that post and I was told to create another one $\endgroup$ – Pasquale Jan 9 at 19:59
  • 2
    $\begingroup$ @NikiEstner They're not duplicates; one is asking to fix the code for cloud deployment, the other is asking how to create such an interface using Mathematica frontend programming. $\endgroup$ – C. E. Jan 9 at 19:59
  • $\begingroup$ What is this: {-> "Dobermann"...? $\endgroup$ – Kuba Jan 9 at 23:25
  • $\begingroup$ before the arrow you have to insert the photo of the dog (for example of a Dobermann) $\endgroup$ – Pasquale Jan 10 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.