Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI, Request | |
| from pydantic import BaseModel | |
| from langgraph_chain import create_graph | |
| from fastapi import Form | |
| app = FastAPI() | |
| graph = create_graph() | |
| class Query(BaseModel): | |
| question: str | |
| def read_root(): | |
| return {"Message": "Welcome To Engineer Astra"} | |
| def ask_q(question: str = Form(...)): | |
| result = graph.invoke({"question": question}) | |
| return {"response": result} | |