Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,13 @@ def process_input(input_text, output_lang):
|
|
33 |
|
34 |
return input_text, english_query, llm_response, final_response
|
35 |
|
|
|
36 |
# Gradio interface
|
37 |
iface = gr.Interface(
|
38 |
-
fn=
|
39 |
inputs=[
|
40 |
-
gr.
|
|
|
41 |
gr.Radio(["ta", "en"], label="Output Language")
|
42 |
],
|
43 |
outputs=[
|
@@ -46,8 +48,9 @@ iface = gr.Interface(
|
|
46 |
gr.Textbox(label="LLM Response (English)"),
|
47 |
gr.Textbox(label="Final Response (Tamil/English)")
|
48 |
],
|
49 |
-
|
50 |
-
|
|
|
51 |
)
|
52 |
|
53 |
iface.launch()
|
|
|
33 |
|
34 |
return input_text, english_query, llm_response, final_response
|
35 |
|
36 |
+
# Gradio interface
|
37 |
# Gradio interface
|
38 |
iface = gr.Interface(
|
39 |
+
fn=process_voice_or_text,
|
40 |
inputs=[
|
41 |
+
gr.Audio(type="filepath", label="Voice Input (Tamil or English)"),
|
42 |
+
gr.Textbox(label="Text Input (Tamil or English)", placeholder="Type your input here..."),
|
43 |
gr.Radio(["ta", "en"], label="Output Language")
|
44 |
],
|
45 |
outputs=[
|
|
|
48 |
gr.Textbox(label="LLM Response (English)"),
|
49 |
gr.Textbox(label="Final Response (Tamil/English)")
|
50 |
],
|
51 |
+
live=True,
|
52 |
+
title="Nisha - Tamil-English Voice Assistant",
|
53 |
+
description="Speak or type in Tamil or English, and get responses in your preferred language!"
|
54 |
)
|
55 |
|
56 |
iface.launch()
|