新增icon
This commit is contained in:
parent
37ac030f9e
commit
9bbeb4f618
BIN
html/favicon.ico
Normal file
BIN
html/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
7
main.py
7
main.py
@ -1,5 +1,5 @@
|
|||||||
from fastapi import FastAPI, WebSocket, WebSocketDisconnect, UploadFile, File
|
from fastapi import FastAPI, WebSocket, WebSocketDisconnect, UploadFile, File
|
||||||
from fastapi.responses import StreamingResponse, HTMLResponse
|
from fastapi.responses import StreamingResponse, HTMLResponse, FileResponse
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
from os.path import isfile
|
from os.path import isfile
|
||||||
@ -114,3 +114,8 @@ async def test():
|
|||||||
async def test():
|
async def test():
|
||||||
with open("html/index.html", "r", encoding="utf-8") as f:
|
with open("html/index.html", "r", encoding="utf-8") as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/favicon.ico", response_class=FileResponse)
|
||||||
|
async def favicon():
|
||||||
|
return FileResponse("html/favicon.ico")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user