def GAN_inference(target_name, run_name, target_runname, already_recorded):
    record_and_makevideo(target_name, run_name, target_runname,
                         already_recorded)

    video = Video.from_file(os.path.join(dir_name, '../../results/', run_name,
                                         "output.mp4"),
                            play=True)
    return video
Exemplo n.º 2
0
    def from_file(cls, filename, **kwargs):
        """Create a `VideoStream` from a local file.

        Parameters
        ----------
        filename: str
            The location of a file to read into the value from disk.
        **kwargs
            Extra keyword arguments for `VideoStream`
        """
        video = Video.from_file(filename, autoplay=False, controls=False)
        return cls(video=video, **kwargs)
Exemplo n.º 3
0
    def from_url(cls, url, **kwargs):
        """Create a `VideoStream` from a url.
        This will create a `VideoStream` from a Video using its url

        Parameters
        ----------
        url: str
            The url of the file that will be used for the .video trait.
        **kwargs:
            Extra keyword arguments for `VideoStream`
        Returns an `VideoStream`.
        """
        video = Video.from_url(url, autoplay=False, controls=False)
        return cls(video=video, **kwargs)
Exemplo n.º 4
0
 def from_download(cls, url, **kwargs):
     """Create a `VideoStream` from a url by downloading
     Parameters
     ----------
     url: str
         The url of the file that will be downloadeded and its bytes
         assigned to the value trait of the video trait.
     **kwargs:
         Extra keyword arguments for `VideoStream`
     Returns an `VideoStream` with the value set from the content of a url.
     """
     ext = os.path.splitext(url)[1]
     if ext:
         format = ext[1:]
     video = Video(value=urlopen(url).read(), format=format, autoplay=False, controls=False)
     return cls(video=video, **kwargs)
Exemplo n.º 5
0
 def _default_video(self):
     return Video(format=self.format, controls=True)