Update app.py
Browse files
app.py
CHANGED
|
@@ -56,6 +56,11 @@ async def generate_text(request: TextGenerationRequest):
|
|
| 56 |
except Exception as e:
|
| 57 |
raise HTTPException(status_code=500, detail=str(e))
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Run the app
|
| 60 |
if __name__ == "__main__":
|
| 61 |
import uvicorn
|
|
|
|
| 56 |
except Exception as e:
|
| 57 |
raise HTTPException(status_code=500, detail=str(e))
|
| 58 |
|
| 59 |
+
# Add a root endpoint for health checks
|
| 60 |
+
@app.get("/")
|
| 61 |
+
async def root():
|
| 62 |
+
return {"message": "API is running!"}
|
| 63 |
+
|
| 64 |
# Run the app
|
| 65 |
if __name__ == "__main__":
|
| 66 |
import uvicorn
|