sagar007 commited on
Commit
fec93e3
·
verified ·
1 Parent(s): 07700db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -283,12 +283,8 @@ class LudoGame:
283
  # Draw game message
284
  draw.text((50, 20), self.message, fill='black')
285
 
286
- # Convert to bytes for Gradio
287
- img_byte_arr = io.BytesIO()
288
- board.save(img_byte_arr, format='PNG')
289
- img_byte_arr.seek(0)
290
-
291
- return img_byte_arr
292
 
293
  # Create the Gradio interface
294
  def create_ludo_game():
@@ -354,4 +350,4 @@ def create_ludo_game():
354
  # Launch the app
355
  if __name__ == "__main__":
356
  app = create_ludo_game()
357
- app.launch()
 
283
  # Draw game message
284
  draw.text((50, 20), self.message, fill='black')
285
 
286
+ # Return the PIL Image directly - Gradio can handle PIL images
287
+ return board
 
 
 
 
288
 
289
  # Create the Gradio interface
290
  def create_ludo_game():
 
350
  # Launch the app
351
  if __name__ == "__main__":
352
  app = create_ludo_game()
353
+ app.launch(share=True)