Hari-Prasath-M91 commited on
Commit
204bc9e
·
1 Parent(s): 095a0ee

modified: app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -14,9 +14,8 @@ from pydantic import BaseModel, Field
14
  from typing_extensions import TypedDict
15
  from langgraph.graph import StateGraph, START, END
16
  from langgraph.constants import Send
17
- from dotenv import load_dotenv
18
 
19
- load_dotenv()
20
 
21
  # Initialize FastAPI app
22
  app = FastAPI(
@@ -762,6 +761,26 @@ def answer_user_query(prompt):
762
  return generate_nl_from_sql_output(prompt, data)
763
 
764
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
  # --- AGENT 1: Task Analysis (Task Analysis Page) ---
766
  @app.get("/agent1")
767
  def agent1(choice: Optional[str] = Query("Four Day Roadmap", description="Choose roadmap: 'Four Day Roadmap' or 'Full Roadmap'")):
 
14
  from typing_extensions import TypedDict
15
  from langgraph.graph import StateGraph, START, END
16
  from langgraph.constants import Send
17
+ from fastapi.responses import HTMLResponse
18
 
 
19
 
20
  # Initialize FastAPI app
21
  app = FastAPI(
 
761
  return generate_nl_from_sql_output(prompt, data)
762
 
763
 
764
+ @app.get("/", response_class=HTMLResponse)
765
+ def root():
766
+ return """
767
+ <html>
768
+ <head>
769
+ <title>Sstudize Agents</title>
770
+ </head>
771
+ <body style="font-family: Arial, sans-serif; text-align: center; margin-top: 50px;">
772
+ <h1>Welcome to Sstudize Agents!</h1>
773
+ <p>Select an agent:</p>
774
+ <ul style="list-style-type: none;">
775
+ <li><a href="/agent1">Agent 1</a></li>
776
+ <li><a href="/agent2">Agent 2</a></li>
777
+ <li><a href="/agent3">Agent 3</a></li>
778
+ </ul>
779
+ </body>
780
+ </html>
781
+ """
782
+
783
+
784
  # --- AGENT 1: Task Analysis (Task Analysis Page) ---
785
  @app.get("/agent1")
786
  def agent1(choice: Optional[str] = Query("Four Day Roadmap", description="Choose roadmap: 'Four Day Roadmap' or 'Full Roadmap'")):