File size: 375 Bytes
144f41f
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from fastapi import FastAPI
from fastapi.responses import FileResponse

# Creamos la instancia de la aplicaci贸n
app = FastAPI()

# Creamos una 煤nica ruta (la principal "/")
# Cuando alguien visite nuestro Space, esta funci贸n se ejecutar谩
@app.get("/")
def read_root():
    # Simplemente devolvemos el contenido del archivo index.html
    return FileResponse('index.html')