Spaces:
Sleeping
Sleeping
Commit ·
1ce0030
1
Parent(s): 179c724
Setup the Hugging face deployment
Browse files
main.py
CHANGED
|
@@ -15,6 +15,11 @@ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
| 15 |
|
| 16 |
app = FastAPI()
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
@app.get("/health")
|
| 19 |
def health_check():
|
| 20 |
# This checks if the URL was loaded correctly from the secrets
|
|
|
|
| 15 |
|
| 16 |
app = FastAPI()
|
| 17 |
|
| 18 |
+
@app.get("/", include_in_schema=False)
|
| 19 |
+
def root():
|
| 20 |
+
# This automatically moves the user from / to /docs
|
| 21 |
+
return RedirectResponse(url="/docs")
|
| 22 |
+
|
| 23 |
@app.get("/health")
|
| 24 |
def health_check():
|
| 25 |
# This checks if the URL was loaded correctly from the secrets
|