Update static file serving path and adjust database file location
Browse files
main.py
CHANGED
@@ -119,12 +119,12 @@ class TokenResponse(BaseModel):
|
|
119 |
refresh_token: str
|
120 |
token_type: str
|
121 |
|
122 |
-
app.mount("/", StaticFiles(directory="static", html=True), name="
|
123 |
|
124 |
# Root endpoint
|
125 |
@app.get("/")
|
126 |
def index() -> FileResponse:
|
127 |
-
return FileResponse(path="/
|
128 |
|
129 |
# Login endpoint to issue tokens
|
130 |
@app.post("/login", response_model=TokenResponse)
|
@@ -163,7 +163,7 @@ def search(
|
|
163 |
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
|
164 |
|
165 |
# Load database
|
166 |
-
database_file = "/
|
167 |
df = load_data(database_file)
|
168 |
logging.info("Database loaded successfully")
|
169 |
|
|
|
119 |
refresh_token: str
|
120 |
token_type: str
|
121 |
|
122 |
+
app.mount("/home", StaticFiles(directory="static", html=True), name="home")
|
123 |
|
124 |
# Root endpoint
|
125 |
@app.get("/")
|
126 |
def index() -> FileResponse:
|
127 |
+
return FileResponse(path="/static/index.html", media_type="text/html")
|
128 |
|
129 |
# Login endpoint to issue tokens
|
130 |
@app.post("/login", response_model=TokenResponse)
|
|
|
163 |
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
|
164 |
|
165 |
# Load database
|
166 |
+
database_file = "/[openai_embedded] The Alchemy of Happiness (Ghazzālī, Claud Field) (Z-Library).parquet"
|
167 |
df = load_data(database_file)
|
168 |
logging.info("Database loaded successfully")
|
169 |
|