VishwaK03's picture
Upload 7 files
2c7cc75 verified
Raw History Blame Contribute Delete
613 Bytes
print("--- [1] STARTING SERVER SCRIPT ---")
from fastapi import FastAPI
from pydantic import BaseModel
import uvicorn
print("--- [2] IMPORTS COMPLETE ---")
app = FastAPI()
@app.get("/")
def home():
return {"status": "Debug Server Running"}
@app.post("/predict")
def predict(data: dict):
print("Received request!")
return {
"error_type": "Test Error",
"confidence": 99.9,
"recommendation": "Connection Successful!"
}
print("--- [3] APP DEFINED. READY TO RUN. ---")
if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=8000)