kwabs22 commited on
Commit
984e889
·
1 Parent(s): a2f3716

Load game supports media now?

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -608,8 +608,8 @@ def load_game(custom_config=None, with_media=False):
608
 
609
  if media_list:
610
  for media_path in media_list:
611
- media_component = create_media_component(media_path)
612
- output_media.append(media_component)
613
  print(f"Created {len(output_media)} media components")
614
 
615
  success_message = f"Custom configuration loaded successfully!\n{new_path_errors}"
@@ -740,8 +740,11 @@ with gr.Blocks() as demo:
740
  print(media_items)
741
  with gr.Group() as wamediagrouping:
742
  gr.HTML("Placeholder to load all media tests")
743
- for item in media_items:
744
- render = item
 
 
 
745
 
746
  return wamediagrouping
747
 
 
608
 
609
  if media_list:
610
  for media_path in media_list:
611
+ #media_component = create_media_component(media_path)
612
+ output_media.append(media_path)
613
  print(f"Created {len(output_media)} media components")
614
 
615
  success_message = f"Custom configuration loaded successfully!\n{new_path_errors}"
 
740
  print(media_items)
741
  with gr.Group() as wamediagrouping:
742
  gr.HTML("Placeholder to load all media tests")
743
+ if not media_items:
744
+ gr.Markdown("No media items to display.")
745
+ else:
746
+ for item in media_items:
747
+ render = create_media_component(item)
748
 
749
  return wamediagrouping
750