Beijuka commited on
Commit
1a8b506
Β·
verified Β·
1 Parent(s): 96407d1

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +23 -15
src/streamlit_app.py CHANGED
@@ -5,6 +5,7 @@ import streamlit as st
5
  import streamlit.components.v1 as components
6
  from pathlib import Path
7
  import os
 
8
 
9
  st.set_page_config(
10
  page_title="Automatic Speech Recognition for African Languages",
@@ -193,18 +194,25 @@ with tab5:
193
 
194
  """)
195
  # Citation
196
- CITATION_TEXT = """@misc{asr-africa-2025,
197
- title = {Automatic Speech Recognition for African Languages},
198
- author = {Dr Joyce Nakatumba-Nabende, Dr Peter Nabende, Dr Andrew Katumba, Alvin Nahabwe},
199
- year = 2025,
200
- publisher = {Hugging Face},
201
- howpublished = "\\url{https://huggingface.co/spaces/asr-africa/Automatic_Speech_Recognition_for_African_Languages}"
202
- }"""
203
-
204
- with st.expander("πŸ“™ Citation", expanded=False):
205
- st.text_area(
206
- "BibTeX snippet to cite this source",
207
- value=CITATION_TEXT,
208
- height=150,
209
- disabled=True
210
- )
 
 
 
 
 
 
 
 
5
  import streamlit.components.v1 as components
6
  from pathlib import Path
7
  import os
8
+ import pyperclip
9
 
10
  st.set_page_config(
11
  page_title="Automatic Speech Recognition for African Languages",
 
194
 
195
  """)
196
  # Citation
197
+ CITATION_TEXT = """@misc{asr-africa-2025,
198
+ title = {Automatic Speech Recognition for African Languages},
199
+ author = {Dr Joyce Nakatumba-Nabende, Dr Peter Nabende, Dr Andrew Katumba, Alvin Nahabwe},
200
+ year = 2025,
201
+ publisher = {Hugging Face},
202
+ howpublished = "\\url{https://huggingface.co/spaces/asr-africa/Automatic_Speech_Recognition_for_African_Languages}"
203
+ }"""
204
+
205
+ with st.expander("πŸ“™ Citation", expanded=False):
206
+ st.text_area(
207
+ "BibTeX snippet to cite this source",
208
+ value=CITATION_TEXT,
209
+ height=150,
210
+ disabled=True
211
+ )
212
+
213
+ if st.button("πŸ“‹ Copy to Clipboard"):
214
+ try:
215
+ pyperclip.copy(CITATION_TEXT)
216
+ st.success("Citation copied to clipboard!")
217
+ except pyperclip.PyperclipException:
218
+ st.error("Could not copy automatically. Please copy manually.")