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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import time
|
| 3 |
+
|
| 4 |
+
# Initialize the slide index in session state (if not already set)
|
| 5 |
+
if "slide_idx" not in st.session_state:
|
| 6 |
+
st.session_state.slide_idx = 0
|
| 7 |
+
|
| 8 |
+
# Define a list of 10 slides. Each slide has a left and a right page.
|
| 9 |
+
# Each paper entry contains the paper number, title, arXiv link, and code link.
|
| 10 |
+
slides = [
|
| 11 |
+
{
|
| 12 |
+
"left": """
|
| 13 |
+
**#1. Neural Module Networks for Reasoning**
|
| 14 |
+
[Arxiv](https://arxiv.org/abs/1234.5678) | [Code](https://github.com/example/nnm)
|
| 15 |
+
|
| 16 |
+
**#2. Neuro-Symbolic AI for Reasoning**
|
| 17 |
+
[Arxiv](https://arxiv.org/abs/2345.6789) | [Code](https://github.com/example/nsa)
|
| 18 |
+
""",
|
| 19 |
+
"right": """
|
| 20 |
+
**#3. Transformer Models for Multi-step Reasoning**
|
| 21 |
+
[Arxiv](https://arxiv.org/abs/3456.7890) | [Code](https://github.com/example/transformer)
|
| 22 |
+
|
| 23 |
+
**#4. Graph Neural Networks in AI**
|
| 24 |
+
[Arxiv](https://arxiv.org/abs/4567.8901) | [Code](https://github.com/example/gnn)
|
| 25 |
+
"""
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"left": """
|
| 29 |
+
**#5. Memory-Augmented Networks for Episodic Recall**
|
| 30 |
+
[Arxiv](https://arxiv.org/abs/5678.9012) | [Code](https://github.com/example/memory)
|
| 31 |
+
|
| 32 |
+
**#6. Self-Supervised Learning for AI**
|
| 33 |
+
[Arxiv](https://arxiv.org/abs/6789.0123) | [Code](https://github.com/example/selfsup)
|
| 34 |
+
""",
|
| 35 |
+
"right": """
|
| 36 |
+
**#7. Reinforcement Learning from Human Feedback**
|
| 37 |
+
[Arxiv](https://arxiv.org/abs/7890.1234) | [Code](https://github.com/example/rlhf)
|
| 38 |
+
|
| 39 |
+
**#8. Transfer Learning in AI Systems**
|
| 40 |
+
[Arxiv](https://arxiv.org/abs/8901.2345) | [Code](https://github.com/example/transfer)
|
| 41 |
+
"""
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"left": """
|
| 45 |
+
**#9. Deep Learning for Medical Imaging**
|
| 46 |
+
[Arxiv](https://arxiv.org/abs/9012.3456) | [Code](https://github.com/example/medimg)
|
| 47 |
+
|
| 48 |
+
**#10. Computer Vision in Telemedicine**
|
| 49 |
+
[Arxiv](https://arxiv.org/abs/0123.4567) | [Code](https://github.com/example/cvtele)
|
| 50 |
+
""",
|
| 51 |
+
"right": """
|
| 52 |
+
**#11. Automated Clinical Documentation via NLP**
|
| 53 |
+
[Arxiv](https://arxiv.org/abs/1234.5679) | [Code](https://github.com/example/clinicalnlp)
|
| 54 |
+
|
| 55 |
+
**#12. Real-Time Transcription and Analysis**
|
| 56 |
+
[Arxiv](https://arxiv.org/abs/2345.6780) | [Code](https://github.com/example/realtime)
|
| 57 |
+
"""
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"left": """
|
| 61 |
+
**#13. Personalized Treatment Recommendation**
|
| 62 |
+
[Arxiv](https://arxiv.org/abs/3456.7891) | [Code](https://github.com/example/treatment)
|
| 63 |
+
|
| 64 |
+
**#14. Integration of Genomic Data in AI**
|
| 65 |
+
[Arxiv](https://arxiv.org/abs/4567.8902) | [Code](https://github.com/example/genomics)
|
| 66 |
+
""",
|
| 67 |
+
"right": """
|
| 68 |
+
**#15. Crowdsourcing in AI Evaluation**
|
| 69 |
+
[Arxiv](https://arxiv.org/abs/5678.9013) | [Code](https://github.com/example/crowd)
|
| 70 |
+
|
| 71 |
+
**#16. Evaluating AI with Human Feedback**
|
| 72 |
+
[Arxiv](https://arxiv.org/abs/6789.0124) | [Code](https://github.com/example/evaluation)
|
| 73 |
+
"""
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"left": """
|
| 77 |
+
**#17. Gradio and Streamlit for Rapid Prototyping**
|
| 78 |
+
[Arxiv](https://arxiv.org/abs/7890.1235) | [Code](https://github.com/example/gradio)
|
| 79 |
+
|
| 80 |
+
**#18. Interactive Demos in Python**
|
| 81 |
+
[Arxiv](https://arxiv.org/abs/8901.2346) | [Code](https://github.com/example/interactive)
|
| 82 |
+
""",
|
| 83 |
+
"right": """
|
| 84 |
+
**#19. HPC for Scaling AI Models**
|
| 85 |
+
[Arxiv](https://arxiv.org/abs/9012.3457) | [Code](https://github.com/example/hpc)
|
| 86 |
+
|
| 87 |
+
**#20. Model Parallelism and Pipeline Techniques**
|
| 88 |
+
[Arxiv](https://arxiv.org/abs/0123.4568) | [Code](https://github.com/example/parallel)
|
| 89 |
+
"""
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"left": """
|
| 93 |
+
**#21. Imitation Learning for Behavior Cloning**
|
| 94 |
+
[Arxiv](https://arxiv.org/abs/1234.5680) | [Code](https://github.com/example/imitate)
|
| 95 |
+
|
| 96 |
+
**#22. GANs for Mirroring Human Actions**
|
| 97 |
+
[Arxiv](https://arxiv.org/abs/2345.6781) | [Code](https://github.com/example/ganmirror)
|
| 98 |
+
""",
|
| 99 |
+
"right": """
|
| 100 |
+
**#23. Empathic AI for Shared World Modeling**
|
| 101 |
+
[Arxiv](https://arxiv.org/abs/3456.7892) | [Code](https://github.com/example/empathic)
|
| 102 |
+
|
| 103 |
+
**#24. Deep Reinforcement Learning in Clinical Support**
|
| 104 |
+
[Arxiv](https://arxiv.org/abs/4567.8903) | [Code](https://github.com/example/deeprl)
|
| 105 |
+
"""
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"left": """
|
| 109 |
+
**#25. Mixture of Experts for AI Systems**
|
| 110 |
+
[Arxiv](https://arxiv.org/abs/5678.9014) | [Code](https://github.com/example/moe)
|
| 111 |
+
|
| 112 |
+
**#26. Conditional Computation and Routing Strategies**
|
| 113 |
+
[Arxiv](https://arxiv.org/abs/6789.0125) | [Code](https://github.com/example/routing)
|
| 114 |
+
""",
|
| 115 |
+
"right": """
|
| 116 |
+
**#27. Ensemble Learning in AI**
|
| 117 |
+
[Arxiv](https://arxiv.org/abs/7890.1236) | [Code](https://github.com/example/ensemble)
|
| 118 |
+
|
| 119 |
+
**#28. Knowledge Distillation Across Models**
|
| 120 |
+
[Arxiv](https://arxiv.org/abs/8901.2347) | [Code](https://github.com/example/distill)
|
| 121 |
+
"""
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"left": """
|
| 125 |
+
**#29. Neural Networks for Adversarial Attacks**
|
| 126 |
+
[Arxiv](https://arxiv.org/abs/9012.3458) | [Code](https://github.com/example/adversary)
|
| 127 |
+
|
| 128 |
+
**#30. Robust Training with Natural Transformations**
|
| 129 |
+
[Arxiv](https://arxiv.org/abs/0123.4569) | [Code](https://github.com/example/robust)
|
| 130 |
+
""",
|
| 131 |
+
"right": """
|
| 132 |
+
**#31. Text-to-Image Translation with GANs**
|
| 133 |
+
[Arxiv](https://arxiv.org/abs/1234.5681) | [Code](https://github.com/example/t2i)
|
| 134 |
+
|
| 135 |
+
**#32. Controlled Caption Generation via Adversarial Attacks**
|
| 136 |
+
[Arxiv](https://arxiv.org/abs/2345.6782) | [Code](https://github.com/example/caption)
|
| 137 |
+
"""
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"left": """
|
| 141 |
+
**#33. Multi-Modal Autoencoders for Medical Data**
|
| 142 |
+
[Arxiv](https://arxiv.org/abs/3456.7893) | [Code](https://github.com/example/multimodal)
|
| 143 |
+
|
| 144 |
+
**#34. Integration of Vision and Language in Healthcare**
|
| 145 |
+
[Arxiv](https://arxiv.org/abs/4567.8904) | [Code](https://github.com/example/visionlang)
|
| 146 |
+
""",
|
| 147 |
+
"right": """
|
| 148 |
+
**#35. Reinforcement Learning for Medical QA Systems**
|
| 149 |
+
[Arxiv](https://arxiv.org/abs/5678.9015) | [Code](https://github.com/example/medicalqa)
|
| 150 |
+
|
| 151 |
+
**#36. Large-Scale Clinical Language Models**
|
| 152 |
+
[Arxiv](https://arxiv.org/abs/6789.0126) | [Code](https://github.com/example/clinicalllm)
|
| 153 |
+
"""
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"left": """
|
| 157 |
+
**#37. Efficient Transformers for Clinical NLP**
|
| 158 |
+
[Arxiv](https://arxiv.org/abs/7890.1237) | [Code](https://github.com/example/lightllm)
|
| 159 |
+
|
| 160 |
+
**#38. Continual Learning for Medical AI**
|
| 161 |
+
[Arxiv](https://arxiv.org/abs/8901.2348) | [Code](https://github.com/example/continual)
|
| 162 |
+
""",
|
| 163 |
+
"right": """
|
| 164 |
+
**#39. Active Learning for AI Annotation**
|
| 165 |
+
[Arxiv](https://arxiv.org/abs/9012.3459) | [Code](https://github.com/example/active)
|
| 166 |
+
|
| 167 |
+
**#40. Automated Model Selection and Routing**
|
| 168 |
+
[Arxiv](https://arxiv.org/abs/0123.4570) | [Code](https://github.com/example/modelselect)
|
| 169 |
+
"""
|
| 170 |
+
}
|
| 171 |
+
]
|
| 172 |
+
|
| 173 |
+
num_slides = len(slides)
|
| 174 |
+
current_slide = slides[st.session_state.slide_idx]
|
| 175 |
+
|
| 176 |
+
# Display slide header (e.g. "Slide 1 of 10")
|
| 177 |
+
st.markdown(f"## Slide {st.session_state.slide_idx + 1} of {num_slides}")
|
| 178 |
+
|
| 179 |
+
# Display left and right pages side by side
|
| 180 |
+
col_left, col_right = st.columns(2)
|
| 181 |
+
with col_left:
|
| 182 |
+
st.markdown("### Left Page")
|
| 183 |
+
st.markdown(current_slide["left"], unsafe_allow_html=True)
|
| 184 |
+
with col_right:
|
| 185 |
+
st.markdown("### Right Page")
|
| 186 |
+
st.markdown(current_slide["right"], unsafe_allow_html=True)
|
| 187 |
+
|
| 188 |
+
# Countdown timer (15 seconds) for auto-advancement
|
| 189 |
+
for remaining in range(15, 0, -1):
|
| 190 |
+
st.markdown(f"**Advancing in {remaining} seconds...**")
|
| 191 |
+
time.sleep(1)
|
| 192 |
+
|
| 193 |
+
# Advance to the next slide (wrap around if at the end)
|
| 194 |
+
st.session_state.slide_idx = (st.session_state.slide_idx + 1) % num_slides
|
| 195 |
+
|
| 196 |
+
# Rerun the app to display the next slide
|
| 197 |
+
st.rerun()
|