mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-25 08:04:49 +00:00
bug: adapt UI random question for streamlit 1.12 and pin to streamlit>=1.9.0 (#3121)
* adapt for streamlit 1.12.0 and pin to streamlit>=1.9.0 * make pylint happy
This commit is contained in:
parent
911a2fa7e4
commit
e7771dc18e
@ -36,5 +36,5 @@ setup(
|
||||
],
|
||||
packages=find_packages(),
|
||||
python_requires=">=3.7, <4",
|
||||
install_requires=["streamlit>=1.2.0, <2", "st-annotated-text>=2.0.0, <3", "markdown>=3.3.4, <4"],
|
||||
install_requires=["streamlit>=1.9.0, <2", "st-annotated-text>=2.0.0, <3", "markdown>=3.3.4, <4"],
|
||||
)
|
||||
|
@ -164,7 +164,13 @@ Ask any question on this topic and see if Haystack can find the correct answer t
|
||||
st.session_state.random_question_requested = True
|
||||
# Re-runs the script setting the random question as the textbox value
|
||||
# Unfortunately necessary as the Random Question button is _below_ the textbox
|
||||
raise st.scriptrunner.script_runner.RerunException(st.scriptrunner.script_requests.RerunData(None))
|
||||
if hasattr(st, "scriptrunner"):
|
||||
raise st.scriptrunner.script_runner.RerunException(
|
||||
st.scriptrunner.script_requests.RerunData(widget_states=None)
|
||||
)
|
||||
raise st.runtime.scriptrunner.script_runner.RerunException(
|
||||
st.runtime.scriptrunner.script_requests.RerunData(widget_states=None)
|
||||
)
|
||||
st.session_state.random_question_requested = False
|
||||
|
||||
run_query = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user