Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -197,7 +197,7 @@ with gr.Blocks(title="Kurukh AI Translator") as demo:
|
|
| 197 |
)
|
| 198 |
|
| 199 |
input_text = gr.Textbox(
|
| 200 |
-
label="Enter Text", placeholder="Type sentences here...", lines=4
|
| 201 |
)
|
| 202 |
|
| 203 |
input_audio = gr.Audio(
|
|
@@ -213,11 +213,30 @@ with gr.Blocks(title="Kurukh AI Translator") as demo:
|
|
| 213 |
output_text = gr.Textbox(
|
| 214 |
label="Translation",
|
| 215 |
lines=4,
|
| 216 |
-
interactive=False
|
|
|
|
| 217 |
)
|
| 218 |
output_audio = gr.Audio(
|
| 219 |
label="🔊 Listen (Hindi Only)", interactive=False
|
| 220 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
|
| 222 |
translate_btn.click(
|
| 223 |
fn=process_translation,
|
|
|
|
| 197 |
)
|
| 198 |
|
| 199 |
input_text = gr.Textbox(
|
| 200 |
+
label="Enter Text", placeholder="Type sentences here...", lines=4 , copyable=True
|
| 201 |
)
|
| 202 |
|
| 203 |
input_audio = gr.Audio(
|
|
|
|
| 213 |
output_text = gr.Textbox(
|
| 214 |
label="Translation",
|
| 215 |
lines=4,
|
| 216 |
+
interactive=False,
|
| 217 |
+
copyable=True
|
| 218 |
)
|
| 219 |
output_audio = gr.Audio(
|
| 220 |
label="🔊 Listen (Hindi Only)", interactive=False
|
| 221 |
)
|
| 222 |
+
|
| 223 |
+
gr.Markdown("### 💡 Try these examples:")
|
| 224 |
+
gr.Examples(
|
| 225 |
+
examples=[
|
| 226 |
+
|
| 227 |
+
# 1. Kurukh (Devanagari Script)
|
| 228 |
+
|
| 229 |
+
["निघै नामे इन्द्रा हिकै?", "Kurukh -> Hindi", False],
|
| 230 |
+
|
| 231 |
+
# 2. Hindi (Devanagari Script - Sentence)
|
| 232 |
+
["तुम कहाँ जा रहे हो?", "Hindi -> Kurukh", False],
|
| 233 |
+
|
| 234 |
+
# 3. Hinglish (Roman Script -> needs Transliteration)
|
| 235 |
+
["Tum kahan ho?", "Hindi -> Kurukh", True],
|
| 236 |
+
],
|
| 237 |
+
inputs=[input_text, direction, is_hinglish],
|
| 238 |
+
label="Click on an example to load it:"
|
| 239 |
+
)
|
| 240 |
|
| 241 |
translate_btn.click(
|
| 242 |
fn=process_translation,
|