dindizz commited on
Commit
7385882
·
verified ·
1 Parent(s): 5230299

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
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=process_input,
39
  inputs=[
40
- gr.Textbox(label="Input (Tamil or English)"),
 
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
- title="Tamil-English Assistant",
50
- description="Enter text in Tamil or English, get responses in Tamil or English!"
 
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()