Spaces:
Runtime error
Runtime error
Commit
•
141b1fb
1
Parent(s):
afd8ce8
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ device = torch.device('cuda')
|
|
11 |
mario_lm = mario_lm.to(device)
|
12 |
TILE_DIR = "data/tiles"
|
13 |
|
14 |
-
def update(prompt
|
15 |
prompts = [prompt]
|
16 |
generated_level = mario_lm.sample(
|
17 |
prompts=prompts,
|
@@ -33,6 +33,6 @@ with gr.Blocks() as demo:
|
|
33 |
inputs=prompt,
|
34 |
outputs=level_image,
|
35 |
fn=update,
|
36 |
-
cache_examples=
|
37 |
)
|
38 |
demo.launch()
|
|
|
11 |
mario_lm = mario_lm.to(device)
|
12 |
TILE_DIR = "data/tiles"
|
13 |
|
14 |
+
def update(prompt):
|
15 |
prompts = [prompt]
|
16 |
generated_level = mario_lm.sample(
|
17 |
prompts=prompts,
|
|
|
33 |
inputs=prompt,
|
34 |
outputs=level_image,
|
35 |
fn=update,
|
36 |
+
cache_examples=True,
|
37 |
)
|
38 |
demo.launch()
|