Spaces:
Sleeping
Sleeping
kausthubkannan17
commited on
Commit
·
7b041dc
1
Parent(s):
fcb6159
fix: session state handling
Browse files- app.py +4 -5
- pages/upload_file.py +2 -2
- pages/upload_url.py +2 -2
app.py
CHANGED
@@ -4,7 +4,6 @@ from utilis import Processing
|
|
4 |
|
5 |
initial_page = "pages/upload_url.py"
|
6 |
|
7 |
-
|
8 |
@st.cache_resource()
|
9 |
def initialize_models():
|
10 |
processing = Processing(
|
@@ -35,13 +34,13 @@ def disable_sidebar(page_title: str):
|
|
35 |
"""
|
36 |
st.markdown(no_sidebar_style, unsafe_allow_html=True)
|
37 |
|
38 |
-
if "metadata" not in st.session_state:
|
39 |
-
st.switch_page("app.py")
|
40 |
-
|
41 |
|
42 |
def main():
|
43 |
disable_sidebar("Drake")
|
44 |
-
|
|
|
|
|
|
|
45 |
st.switch_page(initial_page)
|
46 |
|
47 |
|
|
|
4 |
|
5 |
initial_page = "pages/upload_url.py"
|
6 |
|
|
|
7 |
@st.cache_resource()
|
8 |
def initialize_models():
|
9 |
processing = Processing(
|
|
|
34 |
"""
|
35 |
st.markdown(no_sidebar_style, unsafe_allow_html=True)
|
36 |
|
|
|
|
|
|
|
37 |
|
38 |
def main():
|
39 |
disable_sidebar("Drake")
|
40 |
+
st.title("Drake")
|
41 |
+
|
42 |
+
with st.spinner("Loading models..."):
|
43 |
+
processing, drake = initialize_models()
|
44 |
st.switch_page(initial_page)
|
45 |
|
46 |
|
pages/upload_file.py
CHANGED
@@ -16,8 +16,8 @@ if st.button("Youtube/Video URL"):
|
|
16 |
st.subheader('Upload the file')
|
17 |
uploaded_file = st.file_uploader(label="Choose a file", type=['pdf', 'doc'])
|
18 |
allow_make_notes = st.toggle('Make Complete Notes!')
|
19 |
-
llm_model = st.selectbox('Choose LLM Model', 'gemini-pro')
|
20 |
-
|
21 |
drake.llm_model = llm_model
|
22 |
|
23 |
|
|
|
16 |
st.subheader('Upload the file')
|
17 |
uploaded_file = st.file_uploader(label="Choose a file", type=['pdf', 'doc'])
|
18 |
allow_make_notes = st.toggle('Make Complete Notes!')
|
19 |
+
llm_model = st.selectbox('Choose LLM Model', ('gemini-pro', 'llama'))
|
20 |
+
st.caption("Note: Llama support to be added soon!")
|
21 |
drake.llm_model = llm_model
|
22 |
|
23 |
|
pages/upload_url.py
CHANGED
@@ -13,8 +13,8 @@ if st.button("PDF/Transcript"):
|
|
13 |
|
14 |
st.subheader('Enter the Video URL')
|
15 |
video_url = st.text_input(label="Enter the URL")
|
16 |
-
llm_model = st.selectbox('Choose LLM Model', 'gemini-pro')
|
17 |
-
|
18 |
drake.llm_model = llm_model
|
19 |
|
20 |
allow_make_notes = st.toggle('Make Complete Notes!')
|
|
|
13 |
|
14 |
st.subheader('Enter the Video URL')
|
15 |
video_url = st.text_input(label="Enter the URL")
|
16 |
+
llm_model = st.selectbox('Choose LLM Model', ('gemini-pro', 'llama'))
|
17 |
+
st.caption("Note: Llama support to be added soon!")
|
18 |
drake.llm_model = llm_model
|
19 |
|
20 |
allow_make_notes = st.toggle('Make Complete Notes!')
|