Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Update run ui script to allow presets + update streamlit to accept them (#30)
Suchintan6ff91411fb77
diff --git a/README.md b/README.mdindex 1212b2421..7891eeaa0 100644--- a/README.md+++ b/README.md@@ -147,8 +147,16 @@ Preload these examples inside of our UI so that users can see them in actionProvide a way to run these examples in the UI (via the commandline?) -->We love to see how Skyvern is being used in the wild. Here are some examples of how Skyvern is being used to automate workflows in the real world. Please open PRs to add your own examples!+You'll need to have Skyvern running locally if you want to try these examples out. Please run the following command after going through the quickstart guide:+```+./run_skyvern.sh+```## Automate materials procurement for a manufacturing company+💡 See it in action+```+./run_ui.sh finditparts+```<p align="center"><img src="images/finditparts_recording_crop.gif"/></p>@@ -162,6 +170,11 @@ We love to see how Skyvern is being used in the wild. Here are some examples of<p align="center"><img src="images/bci_seguros_recording.gif"/></p>++💡 See it in action+```+./run_ui.sh geico+```<p align="center"><img src="images/geico_shu_recording_cropped.gif"/></p>diff --git a/run_ui.sh b/run_ui.shindex 7205296d6..5c8e2dd65 100755--- a/run_ui.sh+++ b/run_ui.sh@@ -1,3 +1,5 @@++source "$(poetry env info --path)/bin/activate"python scripts/tracking.py skyvern-oss-run-ui-streamlit run streamlit_app/visualizer/streamlit.py\ No newline at end of file+streamlit run streamlit_app/visualizer/streamlit.py -- $@diff --git a/streamlit_app/visualizer/streamlit.py b/streamlit_app/visualizer/streamlit.pyindex 698d0a65d..5553eda65 100644--- a/streamlit_app/visualizer/streamlit.py+++ b/streamlit_app/visualizer/streamlit.py@@ -1,3 +1,5 @@+import sys+import clipboardimport pandas as pdimport streamlit as st@@ -20,6 +22,8 @@ st.set_page_config(layout="wide")st.markdown(styles.page_font_style, unsafe_allow_html=True)st.markdown(styles.button_style, unsafe_allow_html=True)+tab_name = sys.argv[1] if len(sys.argv) > 1 else ""+# Configurationdef reset_session_state() -> None:@@ -111,14 +115,18 @@ def copy_curl_to_clipboard(task_request_body: TaskRequest) -> None:with execute_tab:- example_tabs = st.tabs([supported_example.name for supported_example in supported_examples])+ # Streamlit doesn't support "focusing" on a tab, so this is a workaround to make the requested tab be the "first" tab+ sorted_supported_examples = sorted(+ supported_examples, key=lambda x: (-1 if x.name.lower() == tab_name.lower() else 0)+ )+ example_tabs = st.tabs([supported_example.name for supported_example in sorted_supported_examples])for i, example_tab in enumerate(example_tabs):with example_tab:create_column, explanation_column = st.columns([1, 2])with create_column:run_task, copy_curl = st.columns([3, 1])- task_request_body = supported_examples[i]+ task_request_body = sorted_supported_examples[i]unique_key = f"{task_request_body.name}"copy_curl.button(@@ -129,7 +137,7 @@ with execute_tab:with st.form(f"task_form_{unique_key}"):run_task.markdown("## Run a task")- example = supported_examples[i]+ example = sorted_supported_examples[i]# Create all the fields to create a TaskRequest objectst_url = st.text_input("URL*", value=example.url, key=f"url_{unique_key}")st_webhook_callback_url = st.text_input(