Spaces:
Sleeping
Sleeping
Commit ·
87a4770
1
Parent(s): 8912b78
Update app.py
Browse files
app.py
CHANGED
|
@@ -150,7 +150,7 @@ def random_sample():
|
|
| 150 |
image = np.array(Image.open(os.path.join(os.path.dirname(__file__), "data/Court.jpeg")))
|
| 151 |
random_characters = [Image.open(os.path.join(os.path.dirname(__file__), f'data/characters_{idx:02}.png')).resize((64, 64)) for idx in SAMPLE_IDX]
|
| 152 |
global CURRENT_POSITION
|
| 153 |
-
CURRENT_POSITION =
|
| 154 |
# CURRENT_POSITION = list(np.random.choice(np.array(RANDOM_POSITION), TOTAL_K, replace = False))
|
| 155 |
# CURRENT_POSITION = random.choices(RANDOM_POSITION, k = TOTAL_K)
|
| 156 |
new_image = Image.fromarray(image).convert('RGBA')
|
|
|
|
| 150 |
image = np.array(Image.open(os.path.join(os.path.dirname(__file__), "data/Court.jpeg")))
|
| 151 |
random_characters = [Image.open(os.path.join(os.path.dirname(__file__), f'data/characters_{idx:02}.png')).resize((64, 64)) for idx in SAMPLE_IDX]
|
| 152 |
global CURRENT_POSITION
|
| 153 |
+
CURRENT_POSITION = get_random_sample(RANDOM_POSITION, TOTAL_K)
|
| 154 |
# CURRENT_POSITION = list(np.random.choice(np.array(RANDOM_POSITION), TOTAL_K, replace = False))
|
| 155 |
# CURRENT_POSITION = random.choices(RANDOM_POSITION, k = TOTAL_K)
|
| 156 |
new_image = Image.fromarray(image).convert('RGBA')
|