eli02 commited on
Commit
3500a11
·
1 Parent(s): de5d7fa

Update static file serving path and adjust database file location

Browse files
Files changed (1) hide show
  1. main.py +3 -3
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="static")
123
 
124
  # Root endpoint
125
  @app.get("/")
126
  def index() -> FileResponse:
127
- return FileResponse(path="/app/static/index.html", media_type="text/html")
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 = "/app/[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
 
 
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