Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,9 +105,10 @@ body, button, input, select, textarea, .gradio-container { font-family: 'Poppins
|
|
| 105 |
"""
|
| 106 |
|
| 107 |
# --- THE UI ---
|
| 108 |
-
|
|
|
|
| 109 |
|
| 110 |
-
# INJECT CSS
|
| 111 |
gr.HTML(custom_css)
|
| 112 |
|
| 113 |
# HEADER
|
|
@@ -142,17 +143,17 @@ with gr.Blocks(title="Kurukh AI Translator") as demo:
|
|
| 142 |
|
| 143 |
input_text = gr.Textbox(label="Enter Text", placeholder="Type sentences here...", lines=4)
|
| 144 |
|
| 145 |
-
|
| 146 |
-
input_audio = gr.Audio(
|
| 147 |
|
| 148 |
translate_btn = gr.Button("Translate π", variant="primary")
|
| 149 |
|
| 150 |
# RIGHT COLUMN
|
| 151 |
with gr.Column():
|
| 152 |
gr.Markdown("### π€ Translation Result")
|
| 153 |
-
|
| 154 |
-
output_text = gr.Textbox(label="Translation", lines=4, interactive=False)
|
| 155 |
-
output_audio = gr.Audio(label="π Listen (Hindi Only)", interactive=False)
|
| 156 |
|
| 157 |
translate_btn.click(
|
| 158 |
fn=process_translation,
|
|
@@ -165,7 +166,6 @@ with gr.Blocks(title="Kurukh AI Translator") as demo:
|
|
| 165 |
gr.Markdown("### π οΈ Help us improve accuracy")
|
| 166 |
gr.Markdown("Our AI is learning! If you spot a mistake, please submit the correct translation below.")
|
| 167 |
|
| 168 |
-
|
| 169 |
with gr.Column():
|
| 170 |
with gr.Row():
|
| 171 |
fb_direction = gr.Radio(["Kurukh -> Hindi", "Hindi -> Kurukh"], label="Direction", value="Kurukh -> Hindi")
|
|
|
|
| 105 |
"""
|
| 106 |
|
| 107 |
# --- THE UI ---
|
| 108 |
+
|
| 109 |
+
with gr.Blocks(theme=gr.themes.Soft(), title="Kurukh AI Translator") as demo:
|
| 110 |
|
| 111 |
+
# INJECT CSS
|
| 112 |
gr.HTML(custom_css)
|
| 113 |
|
| 114 |
# HEADER
|
|
|
|
| 143 |
|
| 144 |
input_text = gr.Textbox(label="Enter Text", placeholder="Type sentences here...", lines=4)
|
| 145 |
|
| 146 |
+
|
| 147 |
+
input_audio = gr.Audio(sources=["microphone"], type="filepath", label="ποΈ Voice Input (Hindi Only)")
|
| 148 |
|
| 149 |
translate_btn = gr.Button("Translate π", variant="primary")
|
| 150 |
|
| 151 |
# RIGHT COLUMN
|
| 152 |
with gr.Column():
|
| 153 |
gr.Markdown("### π€ Translation Result")
|
| 154 |
+
|
| 155 |
+
output_text = gr.Textbox(label="Translation", lines=4, interactive=False, show_copy_button=True)
|
| 156 |
+
output_audio = gr.Audio(label="π Listen (Hindi Only)", interactive=False, autoplay=False)
|
| 157 |
|
| 158 |
translate_btn.click(
|
| 159 |
fn=process_translation,
|
|
|
|
| 166 |
gr.Markdown("### π οΈ Help us improve accuracy")
|
| 167 |
gr.Markdown("Our AI is learning! If you spot a mistake, please submit the correct translation below.")
|
| 168 |
|
|
|
|
| 169 |
with gr.Column():
|
| 170 |
with gr.Row():
|
| 171 |
fb_direction = gr.Radio(["Kurukh -> Hindi", "Hindi -> Kurukh"], label="Direction", value="Kurukh -> Hindi")
|