2. Create the bottleneck values (caching them as appropriate) that normalize the image by resizing and rescaling it. This is done in the following code:
2. Create the bottleneck values (caching them as appropriate) that normalize the image by resizing and rescaling it. This is done in the following code:
...
@@ -1262,9 +1260,7 @@ with open(os.path.join(image_dir, "retrained_label.txt"), "w") as f_label:
...
@@ -1262,9 +1260,7 @@ with open(os.path.join(image_dir, "retrained_label.txt"), "w") as f_label:
*`@templateArgs`: Annotation that enables any local variable to be used within the Jinja2 template. Note that `@templateArgs` cannot be used in combination with `@captureOutput`:
*`@templateArgs`: Annotation that enables any local variable to be used within the Jinja2 template. Note that `@templateArgs` cannot be used in combination with `@captureOutput`:
*`@captureOutput`: Annotation that changes the contract with the route method, so that it doesn’t have to return an HTML fragment anymore. Instead, the method body can simply output the results as it would in a Notebook cell. The framework will capture the output and return it as HTML. Note that you cannot use Jinja2 template in this case.
*`@captureOutput`: Annotation that changes the contract with the route method, so that it doesn’t have to return an HTML fragment anymore. Instead, the method body can simply output the results as it would in a Notebook cell. The framework will capture the output and return it as HTML. Note that you cannot use Jinja2 template in this case.
*`pd_target`: By default, the output of a kernel request is injected in the overall output cell or dialog (if you use `runInDialog=”true”` as an argument to the `run` method). However, you can use `pd_target=”elementId”` to specify a target element that will receive the output. (Note that the `elementId` must exist in the current view.)
*`pd_target`: By default, the output of a kernel request is injected in the overall output cell or dialog (if you use `runInDialog=”true”` as an argument to the `run` method). However, you can use `pd_target=”elementId”` to specify a target element that will receive the output. (Note that the `elementId` must exist in the current view.)
*`pd_script`: This invokes arbitrary Python code as part of the kernel request. This can be used in combination with other attributes like `pd_entity` and `pd_options`. It’s important to note that the Python indentation rules ([https://docs.python.org/2.0/ref/indentation.html](https://docs.python.org/2.0/ref/indentation.html)) must be respected to avoid a runtime error.
*`pd_script`: This invokes arbitrary Python code as part of the kernel request. This can be used in combination with other attributes like `pd_entity` and `pd_options`. It’s important to note that the Python indentation rules ([https://docs.python.org/2.0/ref/indentation.html](https://docs.python.org/2.0/ref/indentation.html)) must be respected to avoid a runtime error.
*`pd_app`: This dynamically invokes a separate PixieApp by its fully qualified class name. The `pd_options` attribute can be used to pass route arguments to invoke a specific route of the PixieApp.
*`pd_app`: This dynamically invokes a separate PixieApp by its fully qualified class name. The `pd_options` attribute can be used to pass route arguments to invoke a specific route of the PixieApp.
*`pd_render_onload`: This should be used to trigger a kernel request upon loading, as opposed to when a user clicks on an element or when a change event occurs. The `pd_render_onload` attribute can be combined with any other attribute that defines the request, like `pd_options` or `pd_script`. Note that this attribute should only be used with a div element.
*`pd_render_onload`: This should be used to trigger a kernel request upon loading, as opposed to when a user clicks on an element or when a change event occurs. The `pd_render_onload` attribute can be combined with any other attribute that defines the request, like `pd_options` or `pd_script`. Note that this attribute should only be used with a div element.
*`pd_refresh`: This is used to force the HTML element to execute a kernel request even if no event (click or change event) has occurred. If no value is specified, then the current element is refreshed, otherwise, the element with the ID specified in the value will be refreshed.
*`pd_refresh`: This is used to force the HTML element to execute a kernel request even if no event (click or change event) has occurred. If no value is specified, then the current element is refreshed, otherwise, the element with the ID specified in the value will be refreshed.
*`pd_event_handler`: Subscribers can listen to an event by declaring a `<pd_event_handler>` child element which can accept any of the PixieApp kernel execution attributes like `pd_options` and `pd_script`. This element must use the `pd_source` attribute to filter which events they want to process. The `pd_source` attribute can contain one of the following values:
*`pd_event_handler`: Subscribers can listen to an event by declaring a `<pd_event_handler>` child element which can accept any of the PixieApp kernel execution attributes like `pd_options` and `pd_script`. This element must use the `pd_source` attribute to filter which events they want to process. The `pd_source` attribute can contain one of the following values: