You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The info stored in modelVersion provides insights about the amount of time that the model can spend processing, the inputs, and
43
+
// The info stored in modelVersion provides insights about the amount of time that the model can spend processing, the input, and
42
44
// output keys of the model.
43
-
logger.info(`Ths model version is ${modelVersion.version}`);
45
+
logger.info(`This model version is ${modelVersion.version}`);
44
46
logger.info(` timeouts: status ${modelVersion.timeout.status}ms, run ${modelVersion.timeout.run}ms `);
45
47
logger.info(" inputs: ");
46
-
for(keyinmodelVersion.inputs){
48
+
for(keyinmodelVersion.inputs){
47
49
letinput=modelVersion.inputs[key];
48
50
logger.info(` key ${input.name}, type ${input.acceptedMediaTypes}, description: ${input.description}`);
49
51
}
50
52
logger.info(" outputs: ")
51
-
for(keyinmodelVersion.outputs){
53
+
for(keyinmodelVersion.outputs){
52
54
letoutput=modelVersion.outputs[key];
53
55
logger.info(` key ${output.name}, type ${output.mediaType}, description: ${output.description}`);
54
56
}
55
57
56
58
// Send the job:
57
-
// With the info about the model (identifier), the model version (version string, input/output keys), you are ready to
59
+
// With the info about the model (identifier) and the model version (version string, input/output keys), you are ready to
58
60
// submit the job. Just prepare the source object:
59
-
letsources={"source-key": {"input.txt": "Modzy is great!"}};
61
+
letsources={"source-key": {"input.txt": "Modzy is great!"}};
60
62
// An inference job groups input data that you send to a model. You can send any amount of inputs to
61
-
// process and you can identify and refer to a specific input by the key that you assign, for example we can add:
62
-
sources["second-key"]={"input.txt": "Sometimes I really hate ribs"}
63
-
sources["another-key"]={"input.txt": "Born and raised in Pennsylvania, Swift moved to Nashville, Tennessee, at the age of 14 to pursue a career in country music"}
63
+
// process and you can identify and refer to a specific input by the key assigned. For example we can add:
64
+
sources["second-key"]={"input.txt": "Sometimes I really hate ribs"}
65
+
sources["another-key"]={"input.txt": "Born and raised in Pennsylvania, Swift moved to Nashville, Tennessee, at the age of 14 to pursue a career in country music"}
64
66
// If you send a wrong input key, the model fails to process the input.
65
-
sources["wrong-key"]={"a.wrong.key": "This input is wrong!"}
67
+
sources["wrong-key"]={"a.wrong.key": "This input is wrong!"}
66
68
// When you have all your inputs ready, you can use our helper method to submit the job as follows:
0 commit comments