Skip to content

Commit

Permalink
Merge pull request #353 from MarcCote/fix_render
Browse files Browse the repository at this point in the history
Add local import.
  • Loading branch information
MarcCote authored Sep 27, 2024
2 parents 3ca9df8 + 6876e58 commit 9100860
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion textworld/generator/maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from textworld.core import EnvInfos
from textworld.utils import make_temp_directory

from textworld.generator import Grammar
from textworld.generator.graph_networks import direction
from textworld.generator.data import KnowledgeBase
Expand Down Expand Up @@ -855,6 +854,8 @@ def render(self, interactive: bool = False):
:param save_screenshot: ONLY FOR WHEN interactive == False. Save screenshot in temp directory.
:param filename: filename for screenshot
"""
import textworld.render

game = self.build(validate=False)
return textworld.render.visualize(game, interactive=interactive)

Expand Down

0 comments on commit 9100860

Please sign in to comment.