Spaces:
Sleeping
Sleeping
MohitGupta41 commited on
Commit ·
dce2995
1
Parent(s): e779a45
Initial Commit
Browse files- Src/api/fastapi_app.py +12 -12
Src/api/fastapi_app.py
CHANGED
|
@@ -26,20 +26,20 @@ def startup_event():
|
|
| 26 |
init_db()
|
| 27 |
seed_data()
|
| 28 |
|
| 29 |
-
@app.get("/")
|
| 30 |
-
def read_root():
|
| 31 |
-
return {"message": "API is live!"}
|
| 32 |
-
# class Message(BaseModel):
|
| 33 |
-
# message: str
|
| 34 |
-
|
| 35 |
-
# @app.get("/", response_model=Message, summary="Root Endpoint", tags=["Root"])
|
| 36 |
# def read_root():
|
| 37 |
-
# """
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
# ----------------------------
|
| 45 |
# 1. Medical RAG Chatbot
|
|
|
|
| 26 |
init_db()
|
| 27 |
seed_data()
|
| 28 |
|
| 29 |
+
# @app.get("/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# def read_root():
|
| 31 |
+
# return {"message": "API is live!"}
|
| 32 |
+
class Message(BaseModel):
|
| 33 |
+
message: str
|
| 34 |
+
|
| 35 |
+
@app.get("/", response_model=Message, summary="Root Endpoint", tags=["Root"])
|
| 36 |
+
def read_root():
|
| 37 |
+
"""
|
| 38 |
+
Root endpoint for checking the API status.
|
| 39 |
|
| 40 |
+
Returns a welcome message.
|
| 41 |
+
"""
|
| 42 |
+
return {"message": "Welcome to My Awesome API!"}
|
| 43 |
|
| 44 |
# ----------------------------
|
| 45 |
# 1. Medical RAG Chatbot
|