Spaces:
Sleeping
Sleeping
Ubuntu
commited on
Commit
·
3be03aa
1
Parent(s):
e3808d6
Remove max tokens slider and simplify interface
Browse files
app.py
CHANGED
|
@@ -50,28 +50,26 @@ with gr.Blocks() as demo:
|
|
| 50 |
</p>
|
| 51 |
<p style="text-align: center;">
|
| 52 |
This demo uses two advanced models:<br>
|
| 53 |
-
-
|
| 54 |
-
-
|
| 55 |
Choose your desired translation direction and get started!<br>
|
| 56 |
</p>
|
| 57 |
<p style="text-align: center;">
|
| 58 |
-
<img src="https://
|
| 59 |
style="width: 150px; display: block; margin: 20px auto;" alt="Moroccan Flag" />
|
| 60 |
</p>
|
| 61 |
""")
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
submit_button = gr.Button("Submit", elem_id="submit_button")
|
| 72 |
-
|
| 73 |
with gr.Row():
|
| 74 |
-
#
|
| 75 |
output = gr.Textbox(label="Translated Text", placeholder="Translation will appear here...")
|
| 76 |
|
| 77 |
# Footer with your name at the bottom
|
|
@@ -82,7 +80,3 @@ with gr.Blocks() as demo:
|
|
| 82 |
|
| 83 |
# Launch the interface
|
| 84 |
demo.launch()
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
| 50 |
</p>
|
| 51 |
<p style="text-align: center;">
|
| 52 |
This demo uses two advanced models:<br>
|
| 53 |
+
- English to Moroccan Arabic (Darija)<br>
|
| 54 |
+
- Moroccan Arabic (Darija) to Modern Standard Arabic (MSA)<br>
|
| 55 |
Choose your desired translation direction and get started!<br>
|
| 56 |
</p>
|
| 57 |
<p style="text-align: center;">
|
| 58 |
+
<img src="https://moroccan-culture-image.s3.eu-north-1.amazonaws.com/2159558.png"
|
| 59 |
style="width: 150px; display: block; margin: 20px auto;" alt="Moroccan Flag" />
|
| 60 |
</p>
|
| 61 |
""")
|
| 62 |
+
# Translation Inputs and Outputs
|
| 63 |
+
user_input = gr.Textbox(label="Enter Your Text", placeholder="Type your sentence here...")
|
| 64 |
+
translation_choice = gr.Dropdown(
|
| 65 |
+
label="Choose Translation Direction",
|
| 66 |
+
choices=["English to Moroccan Arabic", "Moroccan Arabic to MSA"],
|
| 67 |
+
value="English to Moroccan Arabic"
|
| 68 |
+
)
|
| 69 |
+
submit_button = gr.Button("Submit", elem_id="submit_button")
|
| 70 |
+
|
|
|
|
|
|
|
| 71 |
with gr.Row():
|
| 72 |
+
# Output area for translated text
|
| 73 |
output = gr.Textbox(label="Translated Text", placeholder="Translation will appear here...")
|
| 74 |
|
| 75 |
# Footer with your name at the bottom
|
|
|
|
| 80 |
|
| 81 |
# Launch the interface
|
| 82 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|