File size: 523 Bytes
6ed0d96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st
import core

# TODO: add picture
st.set_page_config(
    page_title="arXiv Seach",
    layout="wide"
)

if 'last_query' not in st.session_state:
    st.session_state['last_query'] = None


st.markdown("## arXiv Search")

with st.form("Search form"):
    query = st.text_input("Enter a query")
    clicked = st.form_submit_button("Search")


if clicked:
    st.session_state['last_query'] = query

if st.session_state['last_query'] is not None:
    core.display_answer(st.session_state['last_query'])