Spaces:
Running
Running
first update
Browse files
app.py
CHANGED
@@ -28,12 +28,12 @@ def authenticate(user_id):
|
|
28 |
# Helper function to get the next text for translation
|
29 |
def get_next_text(user_id):
|
30 |
# Filter texts that already have 10 translations
|
31 |
-
eligible_texts = [text for text in source_texts if len(translations[text]) < 10]
|
32 |
-
if not eligible_texts:
|
33 |
-
|
34 |
|
35 |
# Select a random eligible text for translation
|
36 |
-
next_text = random.choice(
|
37 |
return next_text
|
38 |
|
39 |
# Function to handle translation submission
|
|
|
28 |
# Helper function to get the next text for translation
|
29 |
def get_next_text(user_id):
|
30 |
# Filter texts that already have 10 translations
|
31 |
+
# eligible_texts = [text for text in source_texts if len(translations[text]) < 10]
|
32 |
+
# if not eligible_texts:
|
33 |
+
# return "All texts are fully translated."
|
34 |
|
35 |
# Select a random eligible text for translation
|
36 |
+
next_text = random.choice(source_texts)
|
37 |
return next_text
|
38 |
|
39 |
# Function to handle translation submission
|