At the moment given a question, I get a list of answers (dependent on the number of prediction slider),
What I would want is just for the first answer to be displayed, and on clicking the see more button , it shows the rest of the predicted answers
Here is my code
n_predictions = st.sidebar.slider(label=“Number Of Predictions”, min_value=1, max_value=10)
prediction = cdqa_pipeline.predict(query, n_predictions=n_predictions) for i,value in enumerate(prediction): answer,title,paragraph,predictionsss=value annotated_text(("Answer:", '', "#8ef")) answer_var=st.write(answer) title_var=title.replace(" ","%20") url="https://github.com/hebaarch/files/raw/main/dewa/"+title_var annotated_text(("Paragraph:", '', "#faa")) paragraph_var = st.write(paragraph) #paragraph_var=st.write("Paragraph: " + paragraph) annotated_text(("Page Number:", '', "#afa")) page_number = st.write( title) #page_number = st.write("Page Number: " + title) annotated_text(("Download:", '', "#fea")) st.markdown("Download This Report Here [link](%s)" % url)