diff --git a/bin/chat-fastapi.py b/bin/chat-fastapi.py index d9537de..34402eb 100644 --- a/bin/chat-fastapi.py +++ b/bin/chat-fastapi.py @@ -7,7 +7,7 @@ from chainlit.utils import mount_chainlit from dotenv import load_dotenv from fastapi import FastAPI, Request, Response -from fastapi.responses import RedirectResponse +from fastapi.responses import HTMLResponse, RedirectResponse load_dotenv() @@ -172,4 +172,128 @@ async def verify_captcha(request: Request): return redirect_response +@app.get("/chat/") +async def landing_page(): + html_content = """ + + + + + + +
+ +

Meet the React-to-Me AI Chatbot!

+

Your new guide to Reactome. Whether you’re looking for specific genes and pathways or just browsing, our AI Chatbot is here to assist you.

+

We created a model called React-to-Me which interacts in a conversational way, based on content in the Reactome Knowledgebase.

+

We are excited to introduce React-to-Me to get users’ feedback and learn about its strengths and weaknesses. Please try it now and provide us your feedback.

+ + + Provide Feedback + + +
+

+ Personalized: Log into React-to-Me for enhanced features, such as an increased query allowance and securely stored chat history so you can revisit your conversations in the future. +

+ Personal +
+ +
+

+ Guest: Interact with React-to-Me as a guest. Your conversations will not be stored. +

+ Guest +
+
+ + + """ + return HTMLResponse(content=html_content) + + +# Ensure all other endpoints remain mounted mount_chainlit(app=app, target="bin/chat-chainlit.py", path=CHAINLIT_URI) +