Enhancement: Streamlit UI improvements (Loading screen & Downloads) + import fix#1046
Open
detoxj7 wants to merge 5 commits into
Open
Enhancement: Streamlit UI improvements (Loading screen & Downloads) + import fix#1046detoxj7 wants to merge 5 commits into
detoxj7 wants to merge 5 commits into
Conversation
The Streamlit subprocess could not find the 'marker' package because the project root directory was not in the Python path. This fix dynamically calculates the root directory and injects it into PYTHONPATH when launching the Streamlit app via subprocess.
Added a premium full-screen loading overlay with CSS animations (pulsing icon, gradient title, sliding progress bar, animated dots) that displays while load_models() runs. The loading screen is rendered via st.empty() and cleared once models are cached, providing a polished first-load experience instead of the default 'Running load_models()' text.
Added javascript to hide default Streamlit chrome during the loading overlay and implemented a fade-out animation when the loading finishes for a smoother transition to the app.
Contributor
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces several polished UX improvements to the Streamlit app interface and resolves a module resolution bug that occurs when launching the Streamlit app via the CLI subprocess.
Changes Made
1. Streamlit App UI Improvements (
marker/scripts/streamlit_app.py)load_models()executes. Implemented Javascript to hide the default Streamlit chrome (headers, sidebars) while loading, with a smooth fade-out animation once the models are fully cached. This eliminates the awkward "bare" UI state and provides a much better first-impression user experience during the heavy initial AI model download/loading phase..md,.json,.html) and MIME type based on the user's selected output format.2. Module Resolution Fix (
marker/scripts/run_streamlit_app.py)streamlit runsubprocess could fail with aModuleNotFoundErrorfor themarkerpackage depending on the user's environment.PYTHONPATHenvironment variable before executing the Streamlit subprocess, ensuring the localmarkerpackage is always successfully discovered.Testing
python run_streamlit_app.pycorrectly passes thePYTHONPATHand boots without import errors.