Spaces:
Sleeping
Sleeping
update
Browse files- app.py +5 -2
- requirements.txt +2 -0
app.py
CHANGED
@@ -14,8 +14,11 @@ def translate(text, direction):
|
|
14 |
|
15 |
iface = gr.Interface(
|
16 |
fn=translate,
|
17 |
-
inputs=[
|
18 |
-
|
|
|
|
|
|
|
19 |
title="Translation App",
|
20 |
description="Translate text between English and Finnish using Hugging Face Transformers."
|
21 |
)
|
|
|
14 |
|
15 |
iface = gr.Interface(
|
16 |
fn=translate,
|
17 |
+
inputs=[
|
18 |
+
gr.Textbox(lines=2, placeholder="Enter text here..."),
|
19 |
+
gr.Radio(choices=["en-fi", "fi-en"], label="Translation Direction")
|
20 |
+
],
|
21 |
+
outputs=gr.Textbox(),
|
22 |
title="Translation App",
|
23 |
description="Translate text between English and Finnish using Hugging Face Transformers."
|
24 |
)
|
requirements.txt
CHANGED
@@ -7,3 +7,5 @@ torch==2.2.1
|
|
7 |
sentencepiece
|
8 |
gradio
|
9 |
transformers
|
|
|
|
|
|
7 |
sentencepiece
|
8 |
gradio
|
9 |
transformers
|
10 |
+
numpy<2
|
11 |
+
sacremoses
|