Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ for model_name in model_list:
|
|
| 17 |
|
| 18 |
def translate(text, model_name):
|
| 19 |
pipe = translation_pipelines[model_name]
|
| 20 |
-
return pipe(text)[0]["translation_text"] if text else ''
|
| 21 |
|
| 22 |
with gr.Blocks() as demo:
|
| 23 |
with gr.Row():
|
|
|
|
| 17 |
|
| 18 |
def translate(text, model_name):
|
| 19 |
pipe = translation_pipelines[model_name]
|
| 20 |
+
return pipe(text)[0]["translation_text"] if text.strip() else ''
|
| 21 |
|
| 22 |
with gr.Blocks() as demo:
|
| 23 |
with gr.Row():
|