Spaces:
Paused
Paused
first update
Browse files
app.py
CHANGED
|
@@ -14,12 +14,12 @@ processed_data = []
|
|
| 14 |
# Helper function to get the next text for translation
|
| 15 |
def get_next_text(user_id):
|
| 16 |
# Filter texts that already have 10 translations
|
| 17 |
-
eligible_texts = [text for text in source_texts if len(translations[text]) < 10]
|
| 18 |
-
if not eligible_texts:
|
| 19 |
-
|
| 20 |
|
| 21 |
# Select a random eligible text for translation
|
| 22 |
-
next_text = random.choice(
|
| 23 |
return next_text
|
| 24 |
|
| 25 |
# Function to handle translation submission
|
|
|
|
| 14 |
# Helper function to get the next text for translation
|
| 15 |
def get_next_text(user_id):
|
| 16 |
# Filter texts that already have 10 translations
|
| 17 |
+
# eligible_texts = [text for text in source_texts if len(translations[text]) < 10]
|
| 18 |
+
# if not eligible_texts:
|
| 19 |
+
# return "All texts are fully translated."
|
| 20 |
|
| 21 |
# Select a random eligible text for translation
|
| 22 |
+
next_text = random.choice(source_texts)
|
| 23 |
return next_text
|
| 24 |
|
| 25 |
# Function to handle translation submission
|