diff --git a/code/backend/pages/01_Ingest_Data.py b/code/backend/pages/01_Ingest_Data.py index 3bc312726..7e7f76960 100644 --- a/code/backend/pages/01_Ingest_Data.py +++ b/code/backend/pages/01_Ingest_Data.py @@ -89,11 +89,12 @@ def add_url_embeddings(urls: list[str]): for up in uploaded_files: # To read file as bytes: bytes_data = up.getvalue() + title = up.name.encode("latin-1", "replace").decode("latin-1") if st.session_state.get("filename", "") != up.name: # Upload a new file st.session_state["filename"] = up.name st.session_state["file_url"] = blob_client.upload_file( - bytes_data, up.name, metadata={"title": up.name} + bytes_data, up.name, metadata={"title": title} ) if len(uploaded_files) > 0: st.success(