Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,6 +42,8 @@ output_repo_path = 'datasets/emvecchi/therapy_annotation/pilot'
|
|
| 42 |
|
| 43 |
|
| 44 |
|
|
|
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
|
|
@@ -332,18 +334,18 @@ def navigate(index_change):
|
|
| 332 |
# disable text input enter to submit
|
| 333 |
# https://discuss.streamlit.io/t/text-input-how-to-disable-press-enter-to-apply/14457/6
|
| 334 |
components.html(
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
# if (event.key === 'Enter') {
|
| 341 |
# event.preventDefault();
|
| 342 |
# }
|
| 343 |
# });
|
| 344 |
# });
|
| 345 |
# </script>
|
| 346 |
-
|
| 347 |
height=0
|
| 348 |
)
|
| 349 |
|
|
@@ -507,13 +509,13 @@ st.title("Moderator Intervention Prediction")
|
|
| 507 |
|
| 508 |
|
| 509 |
st.markdown(
|
| 510 |
-
#
|
| 511 |
#div[data-testid="stMarkdownContainer"] > p {
|
| 512 |
# font-size: 1rem;
|
| 513 |
#}
|
| 514 |
# section.main > div {max-width:60rem}
|
| 515 |
# </style>
|
| 516 |
-
|
| 517 |
|
| 518 |
|
| 519 |
def add_annotation_guidelines():
|
|
@@ -615,11 +617,11 @@ if 0 <= st.session_state.current_index < len(st.session_state.data):
|
|
| 615 |
|
| 616 |
|
| 617 |
st.markdown(
|
| 618 |
-
#
|
| 619 |
# div[data-testid="InputInstructions"] {
|
| 620 |
# visibility: hidden;
|
| 621 |
# }
|
| 622 |
-
# </style
|
| 623 |
)
|
| 624 |
|
| 625 |
"""
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
+
st.set_page_config(page_title="Therapy Session Annotation", layout="wide")
|
| 46 |
+
st.title("Therapy Session Annotation")
|
| 47 |
|
| 48 |
|
| 49 |
|
|
|
|
| 334 |
# disable text input enter to submit
|
| 335 |
# https://discuss.streamlit.io/t/text-input-how-to-disable-press-enter-to-apply/14457/6
|
| 336 |
components.html(
|
| 337 |
+
|
| 338 |
+
<script>
|
| 339 |
+
const inputs = window.parent.document.querySelectorAll('input');
|
| 340 |
+
inputs.forEach(input => {
|
| 341 |
+
input.addEventListener('keydown', function(event) {
|
| 342 |
# if (event.key === 'Enter') {
|
| 343 |
# event.preventDefault();
|
| 344 |
# }
|
| 345 |
# });
|
| 346 |
# });
|
| 347 |
# </script>
|
| 348 |
+
#
|
| 349 |
height=0
|
| 350 |
)
|
| 351 |
|
|
|
|
| 509 |
|
| 510 |
|
| 511 |
st.markdown(
|
| 512 |
+
# <style>
|
| 513 |
#div[data-testid="stMarkdownContainer"] > p {
|
| 514 |
# font-size: 1rem;
|
| 515 |
#}
|
| 516 |
# section.main > div {max-width:60rem}
|
| 517 |
# </style>
|
| 518 |
+
, unsafe_allow_html=True)
|
| 519 |
|
| 520 |
|
| 521 |
def add_annotation_guidelines():
|
|
|
|
| 617 |
|
| 618 |
|
| 619 |
st.markdown(
|
| 620 |
+
# <style>
|
| 621 |
# div[data-testid="InputInstructions"] {
|
| 622 |
# visibility: hidden;
|
| 623 |
# }
|
| 624 |
+
# </style>, unsafe_allow_html=True
|
| 625 |
)
|
| 626 |
|
| 627 |
"""
|