Update app.py
Browse files
app.py
CHANGED
@@ -128,7 +128,7 @@ def init_session_state():
|
|
128 |
'mp3_files': {}, 'timer_start': time.time(), 'quote_index': 0,
|
129 |
'quote_source': "famous", 'last_sent_transcript': "", 'old_val': None,
|
130 |
'last_refresh': time.time(), 'paper_metadata': {}, 'paste_image_base64': "",
|
131 |
-
'use_arxiv': True, 'use_arxiv_audio': False
|
132 |
}
|
133 |
for k, v in defaults.items():
|
134 |
if k not in st.session_state:
|
@@ -566,9 +566,7 @@ def create_zip_of_files(md_files, mp3_files, png_files, mp4_files, query):
|
|
566 |
# Custom Paste Image Component
|
567 |
def paste_image_component():
|
568 |
with st.form(key="paste_form"):
|
569 |
-
# Hidden text input to receive clipboard data
|
570 |
paste_input = st.text_input("Paste Base64 Image Here (hidden)", value="", key="paste_input", label_visibility="collapsed")
|
571 |
-
# JavaScript to paste clipboard content into the input
|
572 |
st.markdown("""
|
573 |
<script>
|
574 |
function pasteClipboard() {
|
@@ -583,7 +581,6 @@ def paste_image_component():
|
|
583 |
}
|
584 |
</script>
|
585 |
""", unsafe_allow_html=True)
|
586 |
-
# Button to trigger paste
|
587 |
paste_button = st.form_submit_button("Paste Image π", on_click=lambda: st.markdown("<script>pasteClipboard();</script>", unsafe_allow_html=True))
|
588 |
|
589 |
if paste_button and paste_input:
|
@@ -635,10 +632,10 @@ def main():
|
|
635 |
st.rerun()
|
636 |
|
637 |
tab_main = st.radio("Action:", ["π€ Chat & Voice", "π ArXiv", "π PDF to Audio"], horizontal=True, key="tab_main")
|
638 |
-
st.checkbox("Search ArXiv",
|
639 |
-
st.checkbox("ArXiv Audio",
|
640 |
-
st.checkbox("Autosend Chat",
|
641 |
-
st.checkbox("Autosearch ArXiv",
|
642 |
|
643 |
# π€ Chat & Voice
|
644 |
if tab_main == "π€ Chat & Voice":
|
|
|
128 |
'mp3_files': {}, 'timer_start': time.time(), 'quote_index': 0,
|
129 |
'quote_source': "famous", 'last_sent_transcript': "", 'old_val': None,
|
130 |
'last_refresh': time.time(), 'paper_metadata': {}, 'paste_image_base64': "",
|
131 |
+
'use_arxiv': True, 'use_arxiv_audio': False
|
132 |
}
|
133 |
for k, v in defaults.items():
|
134 |
if k not in st.session_state:
|
|
|
566 |
# Custom Paste Image Component
|
567 |
def paste_image_component():
|
568 |
with st.form(key="paste_form"):
|
|
|
569 |
paste_input = st.text_input("Paste Base64 Image Here (hidden)", value="", key="paste_input", label_visibility="collapsed")
|
|
|
570 |
st.markdown("""
|
571 |
<script>
|
572 |
function pasteClipboard() {
|
|
|
581 |
}
|
582 |
</script>
|
583 |
""", unsafe_allow_html=True)
|
|
|
584 |
paste_button = st.form_submit_button("Paste Image π", on_click=lambda: st.markdown("<script>pasteClipboard();</script>", unsafe_allow_html=True))
|
585 |
|
586 |
if paste_button and paste_input:
|
|
|
632 |
st.rerun()
|
633 |
|
634 |
tab_main = st.radio("Action:", ["π€ Chat & Voice", "π ArXiv", "π PDF to Audio"], horizontal=True, key="tab_main")
|
635 |
+
st.checkbox("Search ArXiv", key="use_arxiv") # Removed value parameter
|
636 |
+
st.checkbox("ArXiv Audio", key="use_arxiv_audio") # Removed value parameter
|
637 |
+
st.checkbox("Autosend Chat", key="autosend") # Removed value parameter
|
638 |
+
st.checkbox("Autosearch ArXiv", key="autosearch") # Removed value parameter
|
639 |
|
640 |
# π€ Chat & Voice
|
641 |
if tab_main == "π€ Chat & Voice":
|