Spaces:
Running
Running
Updated for V2.0
Browse files- user_evaluation_variables.py +6 -10
user_evaluation_variables.py
CHANGED
@@ -18,7 +18,7 @@ EVAL_DATABASE_UPDATE_SCHEDULER = CommitScheduler(
|
|
18 |
every=3,
|
19 |
)
|
20 |
|
21 |
-
USERNAME =
|
22 |
EVAL_ID = None
|
23 |
MODEL = None
|
24 |
MODEL_TYPE = None
|
@@ -128,13 +128,11 @@ def update_evaluation_table(evalType, debugging):
|
|
128 |
with open(evalDataPath, 'r') as f:
|
129 |
yamlData = safe_load(f)
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
st.success('Congrats on your first Task-Oriented Bias evaluation!', icon='\U0001F388')
|
137 |
-
yamlData['evaluations']['username'][USERNAME]= {}
|
138 |
|
139 |
yamlData['evaluations']['username'][USERNAME][EVAL_ID] = newEvaluationData
|
140 |
if debugging:
|
@@ -174,8 +172,6 @@ def reset_variables(evalType):
|
|
174 |
global TASK_IMAGES_IN_UI
|
175 |
global CURRENT_EVAL_TYPE
|
176 |
EVAL_ID = None
|
177 |
-
# MODEL = None
|
178 |
-
# MODEL_TYPE = None
|
179 |
NO_SAMPLES = None
|
180 |
RESOLUTION = None
|
181 |
INFERENCE_STEPS = None
|
|
|
18 |
every=3,
|
19 |
)
|
20 |
|
21 |
+
USERNAME = "ANONYMOUS"
|
22 |
EVAL_ID = None
|
23 |
MODEL = None
|
24 |
MODEL_TYPE = None
|
|
|
128 |
with open(evalDataPath, 'r') as f:
|
129 |
yamlData = safe_load(f)
|
130 |
|
131 |
+
if TASK_TARGET is None:
|
132 |
+
st.success('Congrats on your General Bias evaluation!', icon='\U0001F388')
|
133 |
+
else:
|
134 |
+
st.success('Congrats on your Task-Oriented Bias evaluation!', icon='\U0001F388')
|
135 |
+
yamlData['evaluations']['username'][USERNAME]= {}
|
|
|
|
|
136 |
|
137 |
yamlData['evaluations']['username'][USERNAME][EVAL_ID] = newEvaluationData
|
138 |
if debugging:
|
|
|
172 |
global TASK_IMAGES_IN_UI
|
173 |
global CURRENT_EVAL_TYPE
|
174 |
EVAL_ID = None
|
|
|
|
|
175 |
NO_SAMPLES = None
|
176 |
RESOLUTION = None
|
177 |
INFERENCE_STEPS = None
|