dinho1597 commited on
Commit
6fd208f
verified
1 Parent(s): e57e2f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,7 +3,7 @@
3
  import random
4
  from fastmcp import FastMCP
5
 
6
- # Define la aplicaci贸n. Hugging Face/Uvicorn buscar谩 este objeto.
7
  mcp = FastMCP(name="Dice Roller")
8
 
9
  @mcp.tool
@@ -14,4 +14,6 @@ def roll_dice(n_dice: int) -> list[int]:
14
  """
15
  return [random.randint(1, 6) for _ in range(n_dice)]
16
 
17
- # 隆IMPORTANTE! No incluyas el bloque 'if __name__ == "__main__":'
 
 
 
3
  import random
4
  from fastmcp import FastMCP
5
 
6
+ # 1. Se define la instancia de FastMCP como antes
7
  mcp = FastMCP(name="Dice Roller")
8
 
9
  @mcp.tool
 
14
  """
15
  return [random.randint(1, 6) for _ in range(n_dice)]
16
 
17
+ # 2. Se crea expl铆citamente el objeto de la aplicaci贸n ASGI
18
+ # Uvicorn buscar谩 esta variable 'app'.
19
+ app = mcp.http_app()