Hi guys, so this is my sample code
> menu=['Guideline1','Guideline2','Guideline3']
> choice = st.sidebar.selectbox("Choose Guideline", menu)
>
> st.write("")
> if choice == 'Guideline1':
> if num_clicks:
>
> cdqa_pipeline = joblib.load("Guideline1.joblib")
>
> prediction = cdqa_pipeline.predict(num_clicks, n_predictions=n_predictions)
>
> for i, value in enumerate(prediction):
> answer, title, paragraph, predictionsss = value
> annotated_text(("Answer:", '', "#8ef"))
> answer_var = st.write(answer)
> paragraph_var = st.write(paragraph)
>
> if choice == 'Guideline2':
> if num_clicks:
>
> cdqa_pipeline = joblib.load("Guideline2.joblib")
>
> prediction = cdqa_pipeline.predict(num_clicks, n_predictions=n_predictions)
>
> for i, value in enumerate(prediction):
> answer, title, paragraph, predictionsss = value
> annotated_text(("Answer:", '', "#8ef"))
> answer_var = st.write(answer)
>
>
> if choice == 'Guideline3':
> if num_clicks:
>
> cdqa_pipeline = joblib.load("Guideline3.joblib")
>
> prediction = cdqa_pipeline.predict(num_clicks, n_predictions=n_predictions)
>
> for i, value in enumerate(prediction):
> answer, title, paragraph, predictionsss = value
> annotated_text(("Answer:", '', "#8ef"))
> answer_var = st.write(answer)
what I want to do now is, make the select box , as multiselect box and the code runs dynamically based on options.
If I choose guidelines 1& 3, in the line
cdqa_pipeline = joblib.load(" … ") here it should read both Guideline1.joblib and Guideline3.joblib
and outputs result from both!
any advice on how to do this?
Thankyou!