14

The quick fix is to use Manipulate's SaveDefinitions, making it responsible for storing dependencies: f = Sin[x]; CloudDeploy[ Manipulate[Plot[f, {x, 0, t}], {t, 1, 15}, SaveDefinitions -> True] ] I don't know if that is expected, maybe Documentation sticks to the wording precisely here. So it happens because f is not needed to evaluate Manipulate (it ...


9

As we discovered Cloud's FrontEnd can't handle big numbers so well. Pity because the controller does not really operate in those ranges. You can only ask WRI Support about this issue, or design your Manipulate in a way that it will work with Log values. This gets too cumbersome in general. Alternatively, I started a toy project for deploying CloudCDFs ...


8

You can inspect elements of interest and add css with EmbeddedHTML: CloudDeploy[ FormFunction[{ EmbeddedHTML["<style> .btn.btn-primary.form-submit{background: #000080;}</style>"], "first" -> "String", "second" -> "Number" }, f ], Permissions -> "Public" ]


7

This will do most of what you want: Manipulate[ ContourPlot3D[x^2 + y^2 + a z^3 == 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None], {a, -2, 2}] // EmbedCode[ CloudDeploy[#, Permissions -> {All -> {"Read", "Interact"}}], ImageSize -> {50, 80} + ImageDimensions@Rasterize@#] & What this does: It uses the ImageSize ...


6

Another "Wolfram approved" and working solution can be modeled from examples in the Wolfram demonstrations project like this: http://demonstrations.wolfram.com/TheVigenereCipher/. The trick is to use "Initialization" with a delayed assignment ( :> ). Also note the "sintest" URL at the end of the CloudDeploy function. It should help manage all of the ...


5

expr = Import[ CloudObject@"https://www.wolframcloud.com/objects/419dab25-ca42-4b41-8b1f-e7e372c78da9" , "NB" ][[1, 1, 1, 1]] // ToExpression // Delete[#, -2] &; You could try to play with MVue: https://github.com/kubaPod/MVue It does not support ControlsPlacement or custom Grids for control specification yet and SetterBar is replaced with PopupMenu ...


5

You can create an APIFunction with a very similar syntax and return e.g. a png" CloudDeploy[ APIFunction[ {{"ex", "Upload WAV file:"} -> Restricted["UploadedFile", "WAV"]} , HTTPResponse[ExportString[AudioPlot@Import[#ex, "WAV"], "PNG"]] & ] , "api/audioPlot" , Permissions -> "Public" ]; Can't say how to call it from Python but from WL ...


5

You need to specify a CloudObject like so: CloudDeploy[SelectedNotebook[],CloudObject["Your Name Here"],...]


5

I do not think you can automatically save to someone's file system but you can create a download link, it is up to the user to click and get it: CloudDeploy[ FormFunction[ {"first" -> "Number", "second" -> "Number"}, Module[{f = CreateFile[]}, StringTemplate[ "<a href=\"``\" download>Click here to save test.txt</a>" ][ ...


5

FormFunction allows you to upload files directly into the browser, which should bypass your need for Import. If your typespec for your FormFunction is something which Mathematica knows is a file type then it will prompt you to upload a file in the deployed page: CloudDeploy[FormFunction[{"data" -> "CSV"}, ... I believe any of the form specifications for ...


5

The : is used for named patterns, it's not part of any key-value data structure in Mathematica. You will not find it used in the way you propose anywhere in the documentation. You could use either a list of rules: ExportString[{ "key1" -> "value1", "key2" -> "value2" }, "JSON"] "{ "key1": "value1", "key2": "value2" }" Or an Association: ...


4

There are multiple things you can do here. The simplest is generally to use CloudDeploy on the NotebookObject. E.g.: CloudDeploy[EvaluationNotebook[]] Alternatively you can deploy the expression: CloudDeploy[NotebookGet@EvaluationNotebook[]] If you want to deploy it in downloadable form use "Package" and CloudExport: CloudExport[NotebookGet[], "Package"]...


4

You can import plain text and then ImportString: form = FormFunction[ "yourfile" -> "Text" , GeoDistance[ImportString[#yourfile, {"KML", "Data"}][[1, 2, 2, 1, 1]]] & ]; CloudDeploy[form, Permissions -> "Public"]


4

You can do something like this (encoding the PNG in Base64): randomClock[t_] := Rasterize[ Graphics[ Rotate[ClockGauge[t][[1]], RandomReal[{0, 2 \[Pi]}], {0, 0}], ImagePadding -> 0], ImageSize -> 300]; randomClockDeploy[] := With[{t = RandomChoice /@ Range /@ {12, 60, 60}}, <| "img" -> ExportString[randomClock[t], {"Base64", ...


4

This CW is to put b2m2a1's comments on record as a answer. It's actually none of the above three guesses. The computations are done on Wolfram's own servers. This is why interactive things can be so slow. The is the possibility of another computational stage: if the function may be easily reduced to the JavaScript it is, that takes place locally.


4

You can use the channel framework to communicate between your local session and the cloud api you deploy. First create a channel listener with public permissions in your local session: channel = ChannelListen["test", Permissions -> "Public"] Next get the hard coded URL to deploy with your api: In[54]:= channel["URL"] Out[54]= "https://channelbroker....


3

As kirma suggested, I asked WRI support: Q: Can I run Mathematica Enterprise on a virtual machine on AWS, so I can use all of the licensed cores? What are the other available options for running my copy of Mathematica Enterprise on a cloud service, so I can use all of the licensed cores? A: "Well, not sure. I’ve asked the question to the people who make ...


3

Here is what Wolfram Tech Support advised: For applications like this, I would recommend CloudPut and CloudGet: (http://reference.wolfram.com/language/ref/CloudPut.html) (http://reference.wolfram.com/language/ref/CloudGet.html). co = CloudPut[{1, 2, 3}, Permissions -> "Public"]; CloudGet[co] {1, 2, 3} The "List" Import/Export format imports a text ...


3

There are two possible issues: You could be hitting a time-out The definitions aren't exported properly Try this: netco = CloudExport[net, "MX", Permissions -> "Public"]; form = FormPage[{"img" -> "Image"}, With[{result = CloudImport[netco][#img]}, Grid[{ Keys[result], Values[result] }] ] & ]; co = ...


3

I found the solution: beta = APIFunction[{"tablename" -> "String"},ResourceData[ResourceObject[#tablename] ]& ] co = CloudDeploy[beta, Permissions->"Public"] for some reason it requires public permissions


3

I've solved my problem! This is the setup that worked for me: CloudDeploy @ FormFunction[ (* multipage forms on: https://reference.wolfram.com/language/workflow/BuildAMultipageForm.html *) { (* open input forms section *) { (* this is form number 1 *) {"n", "Number of destinations?"} -> "Integer", {"origin", "City of Origin?"} -> "...


3

There are some errors in your code. A working CloudDeploy statement is below. CloudDeploy[ FormPage["image" -> "Image", Column[{#image, "This is a " <> ToString[class[#image]] <> "dog"}] &, AppearanceRules -> <|"Title" -> "What dog is that?", "Description" -> "Enter an image of a dog and I'll tell you ...


3

You must use the SaveDefinitions option on 'Manipulate' which you should save as a separate variable, i.e.: m = Manipulate[ Plot[a f[x], {x, -10, 10}, PlotRange -> {0, 100}], {a, 0, 1}, SaveDefinitions -> True] CloudDeploy[m, Permissions -> "Public"] This will automatically store the definitions of any symbols used by the Manipulate into it. ...


3

It prints to MMA's messages notebook because you didn't submit it to the cloud but to the local session. What your code does is that + it deploys returned TaskObject[..] to the cloud, which does not do anything. So to find the task you are taking about just take a look at ScheduledTasks[] or remove all of them: RemoveScheduledTask /@ ScheduledTasks[] To ...


3

It works nicely when I try it, using m = Manipulate[ Show[ListPlot[ ReIm[Part[Transpose[List @@@ Flatten[Solve[z^n == 1]]], 2]], AspectRatio -> 1, PlotStyle -> Red], Graphics[Circle[]]], {n, 2, 100, 1, Appearance -> "Labeled"}, SaveDefinitions -> True] CloudDeploy[m, Permissions -> "Public"] exactly as you wrote. Here's the ...


3

Read examples in docs carefully (CloudDeploy, FormFunction, FormPage) and see related tutorials. Two options. 1) Outsource control to FormFunction / FormPage: CloudDeploy[ FormPage[ {"n" -><|"Interpreter" -> Restricted["Real",{3,10}], "Control" -> Slider|>}, Plot[Sin[#n x],{x,0,Pi}]&], "test"] 2) Keep control in ...


2

Looking through Names["System`Cloud*"], I found CloudObjectInformation. I think this is what you're looking for. obj = CloudDeploy[ FormFunction[{"x" -> <|"Input" -> "Apple"|>}, Identity], "tem/identity"]; Here's its UUID: CloudObjectInformation[obj, "UUID"] "8112805a-013b-46b9-bdc4-2b20b037d795" Here's its path: CloudObjectInformation[...


2

My practice is to build these forms in parts, then assemble as a last step. With that in mind the following works for me: overlayFO = FormObject[{"kop" -> {head} -> 2}]; overlayFunc = Function[ testdata1 = TimeSeries[Map[Flatten, testdata, {-4}][[All, {1, #kop}]]]; test1 = DateListPlot[testdata1, , PlotStyle -> {Red, Thick}, ...


2

Thank you again @b3m2a1 for the help. The following code runs perfectly. The key line was: Map[AssociateTo[ce["studentKeys", key], #] &, Normal@data]; Here's the whole thing: ClearAll[demoDb] demoDb = <|"studentKeys" -> \ <|"ag5zfmtoYW4tYWNhZGVteXJUCxIIVXNlckRhdGEiRnVzZXJfaWRfa2V5X2h0dHA6Ly9\ ...


2

Form functions get an association from the input dialog, so try Encde[input_] := TableForm[ Flatten[ToUpperCase[ IntegerString[{Times[ToExpression[ToCharacterCode[input["v1"]]], input["p1"]]}, 16]]], TableDirections -> Row] FormFunction[{"v1" -> "String", "p1" -> "Integer"}, Encde]


Only top voted, non community-wiki answers of a minimum length are eligible