Refactor streamlit frontend and monitoring - #2
Merged
Conversation
- Update toxicity type descriptions - Simplify the layout - Improve error handling and user feedback during comment analysis - Remove unused code and comments for better readability
- Remove emojis from titles and headers for a cleaner look. - Adjust caching duration for data loading from 30 seconds to 5 seconds. - Enhance user feedback display by adding true labels for predictions. - Simplify success and warning messages by removing emojis. - Introduce a new section for displaying raw user feedback data.
- Add latency measurement to prediction endpoints in FastAPI. - Include prediction latency in the response payload. - Update Streamlit app to support logging and display of prediction latency. - Introduce a new section for visualizing prediction latency over time.
- Add moderation endpoint to FastAPI for analyzing and making decisions on user-generated content. - Introduce moderation queue management with functionality for human review and statistics retrieval. - Update Streamlit frontend to include moderation actions and display moderation queue statistics. - Enhance user experience by providing feedback on moderation decisions and queue status. - Add new schemas for moderation requests and responses to support the moderation workflow.
- Change moderation decision actions from 'allow' and 'block' to 'approve' and 'reject' for clarity. - Update corresponding schema descriptions to reflect new action terminology. - Enhance unit tests for moderation endpoint to cover new action responses and ensure proper functionality. - Refactor mock model behavior in tests to better simulate prediction outcomes.
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.
Summary
Refactor Streamlit frontend and implement content moderation features with improved monitoring capabilities. Add pre-commits.
Detail