Joffrey Thomas commited on
Commit
ef225bc
·
1 Parent(s): be78e8d

Serve avatars as image/webp

Browse files
Files changed (1) hide show
  1. arena/main.py +2 -0
arena/main.py CHANGED
@@ -1,6 +1,7 @@
1
  """HTTP API + static frontend."""
2
  import asyncio
3
  import json
 
4
  import os
5
  import time
6
  from collections import defaultdict, deque
@@ -17,6 +18,7 @@ from .config import (GAMES_PER_IP_PER_HOUR, GOOGLE_MAPS_BROWSER_KEY, MODELS, ROU
17
  ROUNDS_PER_GAME, AGENT_MAX_STEPS, AGENT_MAX_GEOCODES, public_models, server_key_for)
18
  from .game import GAMES, Game, prune_games
19
 
 
20
  STATIC_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "static")
21
 
22
  app = FastAPI(title="GeoGuessr Arena")
 
1
  """HTTP API + static frontend."""
2
  import asyncio
3
  import json
4
+ import mimetypes
5
  import os
6
  import time
7
  from collections import defaultdict, deque
 
18
  ROUNDS_PER_GAME, AGENT_MAX_STEPS, AGENT_MAX_GEOCODES, public_models, server_key_for)
19
  from .game import GAMES, Game, prune_games
20
 
21
+ mimetypes.add_type("image/webp", ".webp") # missing from some slim images
22
  STATIC_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "static")
23
 
24
  app = FastAPI(title="GeoGuessr Arena")