Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,9 @@ def translate(source, source_language, target_language):
|
|
38 |
|
39 |
import gradio as gr
|
40 |
|
41 |
-
with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
|
|
|
|
42 |
gr.Markdown("# Norwegian-English translation")
|
43 |
# gr.HTML('<img src="https://huggingface.co/ltg/norbert3-base/resolve/main/norbert.png" width=6.75%>')
|
44 |
# gr.Checkbox(label="I want to publish all my conversations", value=True)
|
@@ -48,19 +50,19 @@ with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
|
48 |
with gr.Row():
|
49 |
with gr.Column(scale=1, variant="panel"):
|
50 |
source_language = gr.Dropdown(
|
51 |
-
["English", "Norwegian (Bokmål)", "Norwegian (Nynorsk)"], value="English"
|
52 |
)
|
53 |
source = gr.Textbox(
|
54 |
-
label="Source text", placeholder="What do you want to translate?", show_label=
|
55 |
) # .style(container=False)
|
56 |
submit = gr.Button("Submit", variant="primary") # .style(full_width=True)
|
57 |
|
58 |
with gr.Column(scale=1, variant="panel"):
|
59 |
target_language = gr.Dropdown(
|
60 |
-
["English", "Norwegian (Bokmål)", "Norwegian (Nynorsk)"], value="Norwegian (Bokmål)"
|
61 |
)
|
62 |
target = gr.Textbox(
|
63 |
-
label="Translation", show_label=
|
64 |
)
|
65 |
|
66 |
|
|
|
38 |
|
39 |
import gradio as gr
|
40 |
|
41 |
+
#with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
42 |
+
with gr.Blocks() as demo:
|
43 |
+
|
44 |
gr.Markdown("# Norwegian-English translation")
|
45 |
# gr.HTML('<img src="https://huggingface.co/ltg/norbert3-base/resolve/main/norbert.png" width=6.75%>')
|
46 |
# gr.Checkbox(label="I want to publish all my conversations", value=True)
|
|
|
50 |
with gr.Row():
|
51 |
with gr.Column(scale=1, variant="panel"):
|
52 |
source_language = gr.Dropdown(
|
53 |
+
["English", "Norwegian (Bokmål)", "Norwegian (Nynorsk)"], value="English", show_label=False
|
54 |
)
|
55 |
source = gr.Textbox(
|
56 |
+
label="Source text", placeholder="What do you want to translate?", show_label=False, lines=7, max_lines=100
|
57 |
) # .style(container=False)
|
58 |
submit = gr.Button("Submit", variant="primary") # .style(full_width=True)
|
59 |
|
60 |
with gr.Column(scale=1, variant="panel"):
|
61 |
target_language = gr.Dropdown(
|
62 |
+
["English", "Norwegian (Bokmål)", "Norwegian (Nynorsk)"], value="Norwegian (Bokmål)", show_label=False
|
63 |
)
|
64 |
target = gr.Textbox(
|
65 |
+
label="Translation", show_label=False, interactive=False, lines=7, max_lines=100
|
66 |
)
|
67 |
|
68 |
|