File size: 1,682 Bytes
f525638
3e32e51
b9eba5c
36ec921
f525638
 
 
36ec921
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a08c1a
 
60601c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11b9e87
60601c1
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import streamlit as st
import streamlit.components.v1 as components
from streamlit_shortcuts import button, add_keyboard_shortcuts 
import base64 

st.title("📘Named Entity Recognition")

st.header("Tags the below 41 medical entities")

'ACTIVITY'
'ADMINISTRATION'
'AGE'
'AREA'
'BIOLOGICAL_ATTRIBUTE'
'BIOLOGICAL_STRUCTURE'
'CLINICAL_EVENT'
'COLOR'
'COREFERENCE'
'DATE'
'DETAILED_DESCRIPTION'
'DIAGNOSTIC_PROCEDURE'
'DISEASE_DISORDER'
'DISTANCE'
'DOSAGE'
'DURATION'
'FAMILY_HISTORY'
'FREQUENCY'
'HEIGHT'
'HISTORY'
'LAB_VALUE'
'MASS'
'MEDICATION'
'NONBIOLOGICAL_LOCATION'
'OCCUPATION'
'OTHER_ENTITY'
'OUTCOME'
'PERSONAL_BACKGROUND'
'QUALITATIVE_CONCEPT'
'QUANTITATIVE_CONCEPT'
'SEVERITY'
'SEX'
'SHAPE'
'SIGN_SYMPTOM'
'SUBJECT'
'TEXTURE'
'THERAPEUTIC_PROCEDURE'
'TIME'
'VOLUME'
'WEIGHT'


# Generate the content
content_lines = [f"This is scrollable content line {i}" for i in range(100)]
content_html = "<br>".join(content_lines)

# Create HTML with auto-scroll functionality
html_content = f"""
<!DOCTYPE html>
<html>
<head>
    <style>
        body {{
            font-family: sans-serif;
            padding: 10px;
        }}
    </style>
</head>
<body>
    {content_html}
    <script>
        // Auto-scroll to bottom when loaded
        window.onload = function() {{
            window.scrollTo(0, document.body.scrollHeight);
        }};
    </script>
</body>
</html>
"""

# Display the content in an iframe (this isolates the JavaScript execution)
st.components.v1.html(html_content, height=400, scrolling=True)

# Add a button that refreshes the page (useful if the auto-scroll doesn't work)
if st.button("Scroll to Bottom"):
    pass  # This will cause the page to refresh