diff --git a/code/backend/Admin.py b/code/backend/Admin.py
index 31a4d97fe..627996263 100644
--- a/code/backend/Admin.py
+++ b/code/backend/Admin.py
@@ -31,10 +31,12 @@
menu_items=None,
)
+
def load_css(file_path):
with open(file_path) as f:
st.markdown(f"", unsafe_allow_html=True)
+
# Load the common CSS
load_css("pages/common.css")
diff --git a/code/backend/batch/utilities/helpers/env_helper.py b/code/backend/batch/utilities/helpers/env_helper.py
index ea3b0f429..6e1d209ed 100644
--- a/code/backend/batch/utilities/helpers/env_helper.py
+++ b/code/backend/batch/utilities/helpers/env_helper.py
@@ -227,9 +227,7 @@ def __load_config(self, **kwargs) -> None:
"LOAD_CONFIG_FROM_BLOB_STORAGE"
)
- self.AZURE_ML_WORKSPACE_NAME = os.getenv(
- "AZURE_ML_WORKSPACE_NAME", ""
- )
+ self.AZURE_ML_WORKSPACE_NAME = os.getenv("AZURE_ML_WORKSPACE_NAME", "")
self.PROMPT_FLOW_ENDPOINT_NAME = os.getenv("PROMPT_FLOW_ENDPOINT_NAME", "")
diff --git a/code/backend/pages/01_Ingest_Data.py b/code/backend/pages/01_Ingest_Data.py
index b8ed3dc4c..be67f078c 100644
--- a/code/backend/pages/01_Ingest_Data.py
+++ b/code/backend/pages/01_Ingest_Data.py
@@ -20,13 +20,16 @@
menu_items=None,
)
+
def load_css(file_path):
with open(file_path) as f:
st.markdown(f"", unsafe_allow_html=True)
+
# Load the common CSS
load_css("pages/common.css")
+
def reprocess_all():
backend_url = urllib.parse.urljoin(
env_helper.BACKEND_URL, "/api/BatchStartProcessing"
diff --git a/code/backend/pages/02_Explore_Data.py b/code/backend/pages/02_Explore_Data.py
index 4c2784837..aa3b752b5 100644
--- a/code/backend/pages/02_Explore_Data.py
+++ b/code/backend/pages/02_Explore_Data.py
@@ -27,10 +27,12 @@
# Inject CSS with Markdown
st.markdown(hide_table_row_index, unsafe_allow_html=True)
+
def load_css(file_path):
with open(file_path) as f:
st.markdown(f"", unsafe_allow_html=True)
+
# Load the common CSS
load_css("pages/common.css")
diff --git a/code/backend/pages/03_Delete_Data.py b/code/backend/pages/03_Delete_Data.py
index 5d4da90f9..7f873a1fe 100644
--- a/code/backend/pages/03_Delete_Data.py
+++ b/code/backend/pages/03_Delete_Data.py
@@ -18,10 +18,12 @@
menu_items=None,
)
+
def load_css(file_path):
with open(file_path) as f:
st.markdown(f"", unsafe_allow_html=True)
+
# Load the common CSS
load_css("pages/common.css")
diff --git a/code/backend/pages/04_Configuration.py b/code/backend/pages/04_Configuration.py
index 9ed3063b2..f133c1760 100644
--- a/code/backend/pages/04_Configuration.py
+++ b/code/backend/pages/04_Configuration.py
@@ -18,10 +18,12 @@
menu_items=None,
)
+
def load_css(file_path):
with open(file_path) as f:
st.markdown(f"", unsafe_allow_html=True)
+
# Load the common CSS
load_css("pages/common.css")
diff --git a/code/tests/functional/tests/functions/advanced_image_processing/test_advanced_image_processing.py b/code/tests/functional/tests/functions/advanced_image_processing/test_advanced_image_processing.py
index 083ce58f7..24ff0a39f 100644
--- a/code/tests/functional/tests/functions/advanced_image_processing/test_advanced_image_processing.py
+++ b/code/tests/functional/tests/functions/advanced_image_processing/test_advanced_image_processing.py
@@ -192,7 +192,9 @@ def test_image_passed_to_llm_to_generate_caption(
),
)[0]
- assert request.get_json()["messages"][1]["content"][1]["image_url"]["url"].startswith(
+ assert request.get_json()["messages"][1]["content"][1]["image_url"][
+ "url"
+ ].startswith(
f"{app_config.get('AZURE_STORAGE_ACCOUNT_ENDPOINT')}{app_config.get('AZURE_BLOB_CONTAINER_NAME')}/{FILE_NAME}"
)
diff --git a/code/tests/utilities/helpers/test_llm_helper.py b/code/tests/utilities/helpers/test_llm_helper.py
index 81ac42d3e..6608ccc83 100644
--- a/code/tests/utilities/helpers/test_llm_helper.py
+++ b/code/tests/utilities/helpers/test_llm_helper.py
@@ -138,10 +138,12 @@ def test_generate_embeddings_returns_embeddings(azure_openai_mock):
# then
assert actual_embeddings == expected_embeddings
-@patch('backend.batch.utilities.helpers.llm_helper.DefaultAzureCredential')
-@patch('backend.batch.utilities.helpers.llm_helper.MLClient')
+
+@patch("backend.batch.utilities.helpers.llm_helper.DefaultAzureCredential")
+@patch("backend.batch.utilities.helpers.llm_helper.MLClient")
def test_get_ml_client_initializes_with_expected_parameters(
- mock_ml_client, mock_default_credential, env_helper_mock):
+ mock_ml_client, mock_default_credential, env_helper_mock
+):
# given
llm_helper = LLMHelper()
@@ -153,5 +155,5 @@ def test_get_ml_client_initializes_with_expected_parameters(
mock_default_credential.return_value,
env_helper_mock.AZURE_SUBSCRIPTION_ID,
env_helper_mock.AZURE_RESOURCE_GROUP,
- env_helper_mock.AZURE_ML_WORKSPACE_NAME
+ env_helper_mock.AZURE_ML_WORKSPACE_NAME,
)
diff --git a/code/tests/utilities/tools/test_question_answer_tool.py b/code/tests/utilities/tools/test_question_answer_tool.py
index a8f529f26..f54642702 100644
--- a/code/tests/utilities/tools/test_question_answer_tool.py
+++ b/code/tests/utilities/tools/test_question_answer_tool.py
@@ -339,7 +339,10 @@ def test_use_advanced_vision_processing(env_helper_mock, llm_helper_mock):
"type": "text",
"text": 'Sources: {"retrieved_documents":[{"[doc1]":{"content":"mock content"}},{"[doc2]":{"content":"mock content 2"}}]}, Question: mock question',
},
- {"type": "image_url", "image_url": {"url": "mock source 2mock sas"}},
+ {
+ "type": "image_url",
+ "image_url": {"url": "mock source 2mock sas"},
+ },
],
"role": "user",
},
@@ -411,7 +414,10 @@ def test_limit_number_of_images_passed_to_llm(
"type": "text",
"text": 'Sources: {"retrieved_documents":[{"[doc1]":{"content":"mock content"}},{"[doc2]":{"content":"mock content 2"}},{"[doc3]":{"content":"mock content 3"}}]}, Question: mock question',
},
- {"type": "image_url", "image_url": {"url": "mock source 2mock sas"}},
+ {
+ "type": "image_url",
+ "image_url": {"url": "mock source 2mock sas"},
+ },
],
"role": "user",
},