multimodalart HF Staff commited on
Commit
a28ce33
·
verified ·
1 Parent(s): 9dd6110

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -41,14 +41,11 @@ def make_html_file(generated_level):
41
  <body>
42
  </body>
43
  <script>
44
- const response = await fetch("/gradio_api/file=static/mario.jar");
45
- const jarData = await response.arrayBuffer();
46
  cheerpjInit().then(function () {{
47
  cheerpjAddStringFile("/str/mylevel.txt", `{level_text}`);
48
- await cheerpjAddStringFile("/str/mario.jar", new Uint8Array(jarData));
49
- cheerpjCreateDisplay(512, 500);
50
- cheerpjRunJar("/str/mario.jar");
51
  }});
 
 
52
  </script>
53
  </html>''')
54
  return html_filename # Return just the filename
 
41
  <body>
42
  </body>
43
  <script>
 
 
44
  cheerpjInit().then(function () {{
45
  cheerpjAddStringFile("/str/mylevel.txt", `{level_text}`);
 
 
 
46
  }});
47
+ cheerpjCreateDisplay(512, 500);
48
+ cheerpjRunJar("/gradio_api/file=static/mario.jar");
49
  </script>
50
  </html>''')
51
  return html_filename # Return just the filename