abhinavvvvv's picture
Initial commit with Git LFS
4c55ce6
raw
history blame contribute delete
426 Bytes
from fastapi import FastAPI
from pydantic import BaseModel
from app.predictor import predict_cluster
app = FastAPI()
class LogInput(BaseModel):
log_text: str
@app.get("/")
def root():
return {"status": "RTL Log API running"}
@app.post("/analyze_log")
def analyze_log(data: LogInput):
result = predict_cluster(data.log_text)
return {
"input_log": data.log_text,
"analysis": result
}