Spaces:
Sleeping
Sleeping
glitchbench
commited on
Commit
•
aa8ebcd
1
Parent(s):
be86abb
Update app.py
Browse files
app.py
CHANGED
@@ -182,6 +182,9 @@ def start_labeling(username_label):
|
|
182 |
|
183 |
|
184 |
def show_random_sample(username_label, remaining_batch):
|
|
|
|
|
|
|
185 |
rindex = random.choice(remaining_batch)
|
186 |
remaining_batch.remove(rindex)
|
187 |
|
|
|
182 |
|
183 |
|
184 |
def show_random_sample(username_label, remaining_batch):
|
185 |
+
if remaining_batch is None or not remaining_batch:
|
186 |
+
raise gr.Error("Make sure you are logged in.")
|
187 |
+
|
188 |
rindex = random.choice(remaining_batch)
|
189 |
remaining_batch.remove(rindex)
|
190 |
|