chore: improve async

This commit is contained in:
LUIS NOVO 2025-05-30 15:24:57 -03:00
parent 74daa15ce7
commit 0aacbcaccb
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,6 @@
import asyncio
import nest_asyncio
import streamlit as st
from open_notebook.domain.models import DefaultModels, model_manager
@ -8,6 +9,8 @@ from open_notebook.graphs.ask import graph as ask_graph
from pages.components.model_selector import model_selector
from pages.stream_app.utils import convert_source_references, setup_page
nest_asyncio.apply()
setup_page("🔍 Search")
ask_tab, search_tab = st.tabs(["Ask Your Knowledge Base (beta)", "Search"])

View file

@ -1,7 +1,7 @@
import asyncio
import nest_asyncio
import streamlit as st
import streamlit_scrollable_textbox as stx # type: ignore
from humanize import naturaltime
from open_notebook.domain.models import model_manager
@ -10,6 +10,8 @@ from open_notebook.domain.transformation import Transformation
from open_notebook.graphs.transformation import graph as transform_graph
from pages.stream_app.utils import check_models
nest_asyncio.apply()
def source_panel(source_id: str, notebook_id=None, modal=False):
check_models(only_mandatory=False)
@ -100,4 +102,4 @@ def source_panel(source_id: str, notebook_id=None, modal=False):
with source_tab:
st.subheader("Content")
stx.scrollableTextbox(source.full_text, height=300)
st.markdown(source.full_text)