Jofthomas HF staff commited on
Commit
9a31c2a
1 Parent(s): 4f27caf

Update TextGen/gemini.py

Browse files
Files changed (1) hide show
  1. TextGen/gemini.py +4 -4
TextGen/gemini.py CHANGED
@@ -81,7 +81,7 @@ def get_items_string_representation(items_list):
81
  result += item_str
82
  return result
83
 
84
- def generate_map_markdown(data):
85
  import numpy as np
86
 
87
  # Define the room structure with walls and markers
@@ -98,8 +98,8 @@ def generate_map_markdown(data):
98
  ]
99
 
100
  # Extract rooms and rooms of interest
101
- rooms = [eval(room) for room in data["rooms"]]
102
- rooms_of_interest = [eval(room) for room in data["room_of_interest"]]
103
 
104
  # Determine grid size
105
  min_x = min(room[0] for room in rooms)
@@ -120,7 +120,7 @@ def generate_map_markdown(data):
120
  if room == (0, 0):
121
  room_char = "X"
122
  elif room in rooms_of_interest:
123
- room_char = "P" if i == data["index_exit"] else "?"
124
  else:
125
  room_char = " "
126
  room_structure = create_room(room_char, i)
 
81
  result += item_str
82
  return result
83
 
84
+ def generate_map_markdown(rooms, room_of_interest,index_exit):
85
  import numpy as np
86
 
87
  # Define the room structure with walls and markers
 
98
  ]
99
 
100
  # Extract rooms and rooms of interest
101
+ rooms = [eval(room) for room in rooms]
102
+ rooms_of_interest = [eval(room) for room in room_of_interest]
103
 
104
  # Determine grid size
105
  min_x = min(room[0] for room in rooms)
 
120
  if room == (0, 0):
121
  room_char = "X"
122
  elif room in rooms_of_interest:
123
+ room_char = "P" if i == index_exit else "?"
124
  else:
125
  room_char = " "
126
  room_structure = create_room(room_char, i)