Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def preprocess_and_forward(text: str):
|
|
| 44 |
processed_data = preprocess_text(text)
|
| 45 |
final_text = " ".join([t['suggestions'][0] if t['suggestions'] else t['original'] for t in processed_data["tokens"]])
|
| 46 |
translation = forward_to_translation(final_text)
|
| 47 |
-
return
|
| 48 |
|
| 49 |
def forward_to_translation(text: str) -> str:
|
| 50 |
"""
|
|
|
|
| 44 |
processed_data = preprocess_text(text)
|
| 45 |
final_text = " ".join([t['suggestions'][0] if t['suggestions'] else t['original'] for t in processed_data["tokens"]])
|
| 46 |
translation = forward_to_translation(final_text)
|
| 47 |
+
return processed_data, translation # Unpacking dictionary values separately
|
| 48 |
|
| 49 |
def forward_to_translation(text: str) -> str:
|
| 50 |
"""
|