Spaces:
Sleeping
Sleeping
redirect to complete
Browse files
app.py
CHANGED
@@ -32,6 +32,9 @@ def get_user_id_from_url():
|
|
32 |
HF_TOKEN = os.environ.get("HF_TOKEN_WRITE")
|
33 |
print("is none?", HF_TOKEN is None)
|
34 |
hf_fs = HfFileSystem(token=HF_TOKEN)
|
|
|
|
|
|
|
35 |
input_repo_path = 'datasets/ijundi/mod-gen-eval-test'
|
36 |
output_repo_path = 'datasets/ijundi/mod-gen-eval-test'
|
37 |
to_annotate_file_name = 'pilot_annotation_data.csv' # CSV file to annotate
|
@@ -46,7 +49,7 @@ consent_text = consent_text = '''
|
|
46 |
## Consent Form
|
47 |
You will be asked to take part in a research study. Before you decide to take part in this study, it is important that you understand why the study is being done and what it involves. Please read the following information carefully.
|
48 |
________________________________________________________________________________________
|
49 |
-
Project title:
|
50 |
Researchers: I. Jundi, E.M. Vecchi, N. Falk, G. Lapesa\\
|
51 |
Institute: Institute for Machine Speech Processing (IMS)\\
|
52 |
University: University of Stuttgart\\
|
@@ -71,7 +74,8 @@ Please indicate, in the box below, that you are at least 18 years old, have read
|
|
71 |
- *I agree to participate in this research and I want to continue with the survey.*
|
72 |
'''
|
73 |
guidelines_text = 'Please read <a href="https://someurl.com">the guidelines</a>'
|
74 |
-
study_code = '
|
|
|
75 |
|
76 |
intro_fields: List[Field] = [
|
77 |
Field(name="intro_user_goals", type="text", title="As a user, what are your goals/objectives when commenting about a topic?"),
|
@@ -152,7 +156,7 @@ INPUT_FIELD_DEFAULT_VALUES = {'slider': 0,
|
|
152 |
'checkbox': False}
|
153 |
SHOW_HELP_ICON = False
|
154 |
SHOW_VALIDATION_ERROR_MESSAGE = True
|
155 |
-
|
156 |
|
157 |
def read_data(_path):
|
158 |
with hf_fs.open(input_repo_path + '/' + _path) as f:
|
@@ -386,7 +390,7 @@ elif st.session_state.current_index < len(st.session_state.data):
|
|
386 |
show_fields(fields)
|
387 |
|
388 |
else:
|
389 |
-
st.write(f"Thank you for taking part in this study!
|
390 |
|
391 |
# Navigation buttons
|
392 |
if st.session_state.current_index > 0:
|
|
|
32 |
HF_TOKEN = os.environ.get("HF_TOKEN_WRITE")
|
33 |
print("is none?", HF_TOKEN is None)
|
34 |
hf_fs = HfFileSystem(token=HF_TOKEN)
|
35 |
+
|
36 |
+
########################################################################################
|
37 |
+
# CHANGE THE FOLLOWING VARIABLES ACCORDING TO YOUR NEEDS
|
38 |
input_repo_path = 'datasets/ijundi/mod-gen-eval-test'
|
39 |
output_repo_path = 'datasets/ijundi/mod-gen-eval-test'
|
40 |
to_annotate_file_name = 'pilot_annotation_data.csv' # CSV file to annotate
|
|
|
49 |
## Consent Form
|
50 |
You will be asked to take part in a research study. Before you decide to take part in this study, it is important that you understand why the study is being done and what it involves. Please read the following information carefully.
|
51 |
________________________________________________________________________________________
|
52 |
+
Project title: Moderation Properties\\
|
53 |
Researchers: I. Jundi, E.M. Vecchi, N. Falk, G. Lapesa\\
|
54 |
Institute: Institute for Machine Speech Processing (IMS)\\
|
55 |
University: University of Stuttgart\\
|
|
|
74 |
- *I agree to participate in this research and I want to continue with the survey.*
|
75 |
'''
|
76 |
guidelines_text = 'Please read <a href="https://someurl.com">the guidelines</a>'
|
77 |
+
study_code = 'CE552C7F'
|
78 |
+
redirect_url = f'https://app.prolific.com/submissions/complete?cc={study_code}'
|
79 |
|
80 |
intro_fields: List[Field] = [
|
81 |
Field(name="intro_user_goals", type="text", title="As a user, what are your goals/objectives when commenting about a topic?"),
|
|
|
156 |
'checkbox': False}
|
157 |
SHOW_HELP_ICON = False
|
158 |
SHOW_VALIDATION_ERROR_MESSAGE = True
|
159 |
+
########################################################################################
|
160 |
|
161 |
def read_data(_path):
|
162 |
with hf_fs.open(input_repo_path + '/' + _path) as f:
|
|
|
390 |
show_fields(fields)
|
391 |
|
392 |
else:
|
393 |
+
st.write(f"Thank you for taking part in this study! [Click here]({redirect_url}) to complete the study.")
|
394 |
|
395 |
# Navigation buttons
|
396 |
if st.session_state.current_index > 0:
|