import streamlit as st from model_utils import PaperClassifier st.set_page_config(page_title="Paper Classifier", layout="centered") st.markdown(""" """, unsafe_allow_html=True) @st.cache_resource(show_spinner="Loading model...") def load_model(): return PaperClassifier() EXAMPLES = [ {"title": "Attention Is All You Need", "abstract": "We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely."}, {"title": "A Survey on 3D Gaussian Splatting", "abstract": "3D Gaussian splatting (GS) has emerged as a transformative technique in radiance fields. Unlike mainstream implicit neural models, 3D GS uses millions of learnable 3D Gaussians for an explicit scene representation."}, {"title": "Interior Point Differential Dynamic Programming", "abstract": ""}, ] if "input_title" not in st.session_state: st.session_state.input_title = "" if "input_abstract" not in st.session_state: st.session_state.input_abstract = "" def set_example(idx): st.session_state.input_title = EXAMPLES[idx]["title"] st.session_state.input_abstract = EXAMPLES[idx]["abstract"] def show_results(results): st.markdown(f"### Predicted {len(results)} categories") for r in results: pct = r["probability"] * 100 st.markdown(f"""