Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ print("Model ready on:", "GPU" if torch.cuda.is_available() else "CPU")
|
|
| 45 |
|
| 46 |
# === Translation function ===
|
| 47 |
@spaces.GPU(duration=180)
|
| 48 |
-
def
|
| 49 |
if not text.strip():
|
| 50 |
return "Please enter text to translate."
|
| 51 |
|
|
|
|
| 45 |
|
| 46 |
# === Translation function ===
|
| 47 |
@spaces.GPU(duration=180)
|
| 48 |
+
def predict(text, src="eng_Latn", tgt="lug_Latn"):
|
| 49 |
if not text.strip():
|
| 50 |
return "Please enter text to translate."
|
| 51 |
|