Adding the Streamlit demo app code for the RAG model#7455
Adding the Streamlit demo app code for the RAG model#7455yjernite wants to merge 2 commits intohuggingface:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7455 +/- ##
==========================================
+ Coverage 76.60% 78.91% +2.31%
==========================================
Files 181 181
Lines 35865 35865
==========================================
+ Hits 27473 28302 +829
+ Misses 8392 7563 -829
Continue to review full report at Codecov.
|
|
|
||
| # Full screen question and answers | ||
| st.markdown("--- ") | ||
| left_a, right_a = st.columns(2) |
There was a problem hiding this comment.
The current version of streamlit uses beta_columns instead of columns. I think this may be from the horiz-layout branch of streamlit, so it would be nice to indicate somewhere if that is the case or change to beta_columns.
There was a problem hiding this comment.
It was merged from that branch with the beta_ prefix in this PR
| right_a.markdown(answer_md) | ||
|
|
||
| # Split into left and right | ||
| left_c, right_c = st.columns(2) |
There was a problem hiding this comment.
Same as above, current version of streamlit uses st.beta_columns()
| # Split into left and right | ||
| left_c, right_c = st.columns(2) | ||
|
|
||
| col_a, col_b, col_c, col_d = st.columns(4) |
There was a problem hiding this comment.
Same as above, current version of streamlit uses st.beta_columns()
| ) | ||
|
|
||
| # token-level plot | ||
| plot_container = col_d.container() |
There was a problem hiding this comment.
As with the columns, the current function for the container is beta_container().
|
Thank you for the demo! I added some comments with an issue I faced when running it regarding Streamlit. |
|
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7455 +/- ##
==========================================
+ Coverage 76.60% 78.91% +2.31%
==========================================
Files 181 181
Lines 35865 35865
==========================================
+ Hits 27473 28302 +829
+ Misses 8392 7563 -829 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adding RAG demo code
This PR shares the code for the RAG demo running here for future reference. The code is added in
examples/rag