e5-large-v2 / main.py
limcheekin's picture
added code and updated for BAAI/bge-small-en-v1.5 model
186f18b
raw
history blame contribute delete
508 Bytes
from open.text.embeddings.server.app import create_app
from fastapi.responses import HTMLResponse
import os
app = create_app()
# Read the content of index.html once and store it in memory
with open("index.html", "r") as f:
content = f.read()
@app.get("/", response_class=HTMLResponse)
async def read_items():
return content
if __name__ == "__main__":
import uvicorn
uvicorn.run(app,
host=os.environ["HOST"],
port=int(os.environ["PORT"])
)