Spaces:
Running
Running
Commit ·
bfe256d
1
Parent(s): aae9e98
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,8 +140,8 @@ def translate(input_text, language_label):
|
|
| 140 |
response = client.text_generation(
|
| 141 |
prompt=formatted_input,
|
| 142 |
model=MODEL_NAME,
|
| 143 |
-
max_new_tokens=500, # Adjust based on expected translation length
|
| 144 |
-
wait_for_model=True, # Avoids cold-start issues (Pro users skip queues)
|
| 145 |
)
|
| 146 |
return response.strip()
|
| 147 |
except Exception as e:
|
|
|
|
| 140 |
response = client.text_generation(
|
| 141 |
prompt=formatted_input,
|
| 142 |
model=MODEL_NAME,
|
| 143 |
+
# max_new_tokens=500, # Adjust based on expected translation length
|
| 144 |
+
# wait_for_model=True, # Avoids cold-start issues (Pro users skip queues)
|
| 145 |
)
|
| 146 |
return response.strip()
|
| 147 |
except Exception as e:
|