CaioXapelaum commited on
Commit
4f88cb7
·
verified ·
1 Parent(s): b5c717f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -4,8 +4,12 @@ from fastapi.responses import JSONResponse
4
 
5
  app = FastAPI()
6
 
 
 
 
 
7
  @app.get("/v1/models")
8
- async def index():
9
  url = 'https://huggingface.co/models-json?inference=warm&sort=trending&withCount=true'
10
  async with aiohttp.ClientSession() as session:
11
  async with session.get(url) as response:
 
4
 
5
  app = FastAPI()
6
 
7
+ @app.get('/')
8
+ async def homepage():
9
+ return "Request or go to /v1/models to use the space, make sure its a GET"
10
+
11
  @app.get("/v1/models")
12
+ async def main():
13
  url = 'https://huggingface.co/models-json?inference=warm&sort=trending&withCount=true'
14
  async with aiohttp.ClientSession() as session:
15
  async with session.get(url) as response: