Spaces:
Sleeping
Sleeping
Commit ·
244a0aa
1
Parent(s): ee25cd7
Updating app
Browse files- .gitignore +1 -0
- app.py +10 -0
- sidekick.py +2 -0
- sidekick_tools.py +3 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.env
|
app.py
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from sidekick import Sidekick
|
| 3 |
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
# Run playwright install once (only if not already installed)
|
| 5 |
+
def ensure_playwright():
|
| 6 |
+
if not os.path.exists(os.path.expanduser("~/.cache/ms-playwright")):
|
| 7 |
+
subprocess.run(["playwright", "install", "--with-deps"], check=True)
|
| 8 |
+
|
| 9 |
+
ensure_playwright()
|
| 10 |
+
|
| 11 |
import gradio as gr
|
| 12 |
from sidekick import Sidekick
|
| 13 |
|
sidekick.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
from typing import Annotated
|
| 2 |
from typing_extensions import TypedDict
|
| 3 |
from langgraph.graph import StateGraph, START, END
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
from typing import Annotated
|
| 4 |
from typing_extensions import TypedDict
|
| 5 |
from langgraph.graph import StateGraph, START, END
|
sidekick_tools.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from playwright.async_api import async_playwright
|
| 2 |
from langchain_community.agent_toolkits import PlayWrightBrowserToolkit
|
| 3 |
from dotenv import load_dotenv
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
|
| 4 |
from playwright.async_api import async_playwright
|
| 5 |
from langchain_community.agent_toolkits import PlayWrightBrowserToolkit
|
| 6 |
from dotenv import load_dotenv
|