pushpinder06 commited on
Commit
6742f82
·
verified ·
1 Parent(s): a62d6cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -35,15 +35,15 @@ def handle_voice_query(audio_file):
35
  with gr.Blocks() as demo:
36
  gr.Markdown("# 🌾 **AgroVision: ਪੰਜਾਬੀ ਵੈਚਲਣ ਸਹਾਇਕ**")
37
 
38
- with gr.TabItem("🗣️ ਆਵਾਜ਼ ਰਾਹੀਂ ਪੁੱਛੋ"):
39
- gr.Markdown("### ਆਪਣਾ ਸਵਾਲ ਆਵਾਜ਼ ਰਾਹੀਂ ਪੁੱਛੋ (ਪੰਜਾਬੀ ਵਿੱਚ)")
40
- audio_input = gr.Audio(type="filepath", label="🎤 ਸਵਾਲ ਬੋਲੋ")
41
- query_text = gr.Textbox(label="🔍 ਬੋਲਿਆ ਗਿਆ ਸਵਾਲ")
42
- gemini_response = gr.Textbox(label="📜 Gemini ਜਵਾਬ")
43
- audio_output = gr.Audio(label="🔊 ਆਵਾਜ਼ੀ ਜਵਾਬ")
44
- submit_btn = gr.Button("➡️ ਜਵਾਬ ਲਵੋ")
45
- submit_btn.click(fn=handle_voice_query,
46
- inputs=[audio_input],
47
- outputs=[query_text, gemini_response, audio_output])
48
 
49
  demo.launch()
 
35
  with gr.Blocks() as demo:
36
  gr.Markdown("# 🌾 **AgroVision: ਪੰਜਾਬੀ ਵੈਚਲਣ ਸਹਾਇਕ**")
37
 
38
+ with gr.TabItem("🗣️ ਆਵਾਜ਼ ਰਾਹੀਂ ਪੁੱਛੋ"):
39
+ gr.Markdown("### ਆਪਣਾ ਸਵਾਲ ਆਵਾਜ਼ ਰਾਹੀਂ ਪੁੱਛੋ (ਪੰਜਾਬੀ ਵਿੱਚ)")
40
+ audio_input = gr.Audio(type="filepath", label="🎤 ਸਵਾਲ ਬੋਲੋ")
41
+ query_text = gr.Textbox(label="🔍 ਬੋਲਿਆ ਗਿਆ ਸਵਾਲ")
42
+ gemini_response = gr.Textbox(label="📜 Gemini ਜਵਾਬ")
43
+ audio_output = gr.Audio(label="🔊 ਆਵਾਜ਼ੀ ਜਵਾਬ")
44
+ submit_btn = gr.Button("➡️ ਜਵਾਬ ਲਵੋ")
45
+ submit_btn.click(fn=handle_voice_query,
46
+ inputs=[audio_input],
47
+ outputs=[query_text, gemini_response, audio_output])
48
 
49
  demo.launch()