Skip to content

Refactor streamlit frontend and monitoring - #2

Merged
jairus-m merged 6 commits into
mainfrom
feat/refactor-streamlit
Aug 15, 2025
Merged

Refactor streamlit frontend and monitoring#2
jairus-m merged 6 commits into
mainfrom
feat/refactor-streamlit

Conversation

@jairus-m

@jairus-m jairus-m commented Aug 15, 2025

Copy link
Copy Markdown
Owner

Summary

Refactor Streamlit frontend and implement content moderation features with improved monitoring capabilities. Add pre-commits.

Detail

  • Refactored Streamlit frontend for better code organization
  • Enhanced Streamlit monitoring app UI and functionality
  • Added prediction latency tracking in FastAPI and Streamlit
  • Implemented content moderation features across FastAPI backend and Streamlit
  • Updated moderation actions and improved test coverage
  • Added pre-commit to lint and format python code

- 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.
@jairus-m jairus-m changed the title Refactor streamlit frontend / monitoring Refactor streamlit frontend and monitoring Aug 15, 2025
@jairus-m
jairus-m merged commit 47dab35 into main Aug 15, 2025
3 checks passed
@jairus-m
jairus-m deleted the feat/refactor-streamlit branch August 20, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant