Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -360,7 +360,14 @@ async def playground():
|
|
360 |
if html_content is None:
|
361 |
return HTMLResponse(content="<h1>playground.html not found</h1>", status_code=404)
|
362 |
return HTMLResponse(content=html_content)
|
363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
# Model routes
|
365 |
@app.get("/api/v1/models")
|
366 |
@app.get("/models")
|
|
|
360 |
if html_content is None:
|
361 |
return HTMLResponse(content="<h1>playground.html not found</h1>", status_code=404)
|
362 |
return HTMLResponse(content=html_content)
|
363 |
+
|
364 |
+
@app.get("/image-playground", response_class=HTMLResponse)
|
365 |
+
async def playground():
|
366 |
+
html_content = read_html_file("image-playground.html")
|
367 |
+
if html_content is None:
|
368 |
+
return HTMLResponse(content="<h1>image-playground.html not found</h1>", status_code=404)
|
369 |
+
return HTMLResponse(content=html_content)
|
370 |
+
|
371 |
# Model routes
|
372 |
@app.get("/api/v1/models")
|
373 |
@app.get("/models")
|