Spaces:
Runtime error
Runtime error
Update web_gui/streamlit.py
Browse files- web_gui/streamlit.py +3 -3
web_gui/streamlit.py
CHANGED
|
@@ -527,13 +527,13 @@ if mode == "RAG Chat":
|
|
| 527 |
# Rerun to update sidebar immediately
|
| 528 |
st.rerun()
|
| 529 |
|
| 530 |
-
###### Added
|
| 531 |
-
if mode == "
|
| 532 |
if "tfidf_engine" not in st.session_state:
|
| 533 |
engine = SimpleSearchEngine(corpus_dir="corpus")
|
| 534 |
engine.build_index()
|
| 535 |
st.session_state["tfidf_engine"] = engine
|
| 536 |
-
st.title("
|
| 537 |
|
| 538 |
query = st.text_input("Search",placeholder="Search the One Piece corpus…")
|
| 539 |
|
|
|
|
| 527 |
# Rerun to update sidebar immediately
|
| 528 |
st.rerun()
|
| 529 |
|
| 530 |
+
###### Added Search engine logic
|
| 531 |
+
if mode == "Search engine":
|
| 532 |
if "tfidf_engine" not in st.session_state:
|
| 533 |
engine = SimpleSearchEngine(corpus_dir="corpus")
|
| 534 |
engine.build_index()
|
| 535 |
st.session_state["tfidf_engine"] = engine
|
| 536 |
+
st.title("Search Engine")
|
| 537 |
|
| 538 |
query = st.text_input("Search",placeholder="Search the One Piece corpus…")
|
| 539 |
|