From 3c90e16d3d38a9ba0e672e8ed8fc99f50c3069b8 Mon Sep 17 00:00:00 2001 From: Pranshu Gupta Date: Sun, 3 Dec 2023 13:06:59 +0530 Subject: [PATCH 1/3] Update UrlInputSection.tsx --- frontend/src/components/UrlInputSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UrlInputSection.tsx b/frontend/src/components/UrlInputSection.tsx index abf50a9..92ee7ab 100644 --- a/frontend/src/components/UrlInputSection.tsx +++ b/frontend/src/components/UrlInputSection.tsx @@ -59,7 +59,7 @@ export function UrlInputSection({ doCreate, screenshotOneApiKey }: Props) { } return ( -
+
Or screenshot a URL...
Date: Sun, 3 Dec 2023 19:52:53 -0500 Subject: [PATCH 2/3] tweak --- frontend/src/components/UrlInputSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UrlInputSection.tsx b/frontend/src/components/UrlInputSection.tsx index 92ee7ab..e2137e1 100644 --- a/frontend/src/components/UrlInputSection.tsx +++ b/frontend/src/components/UrlInputSection.tsx @@ -59,7 +59,7 @@ export function UrlInputSection({ doCreate, screenshotOneApiKey }: Props) { } return ( -
+
Or screenshot a URL...
Date: Sun, 3 Dec 2023 19:58:22 -0500 Subject: [PATCH 3/3] add default backend home route so people know it's running correctly --- backend/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/main.py b/backend/main.py index f91b25a..e7cc082 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1,5 +1,6 @@ # Load environment variables first from dotenv import load_dotenv +from fastapi.responses import HTMLResponse load_dotenv() @@ -38,6 +39,13 @@ SHOULD_MOCK_AI_RESPONSE = bool(os.environ.get("MOCK", False)) app.include_router(screenshot.router) +@app.get("/") +async def get_status(): + return HTMLResponse( + content="

Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.

" + ) + + def write_logs(prompt_messages, completion): # Get the logs path from environment, default to the current working directory logs_path = os.environ.get("LOGS_PATH", os.getcwd())