DSatishchandra commited on
Commit
db61a2b
1 Parent(s): 82555d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,13 +3,14 @@ import order_assistant # The module you renamed to 'order_assistant'
3
  import asyncio
4
 
5
  # Gradio interface function
6
- def food_order_interface(audio_input, food_type):
7
- return order_assistant.food_order_assistant(audio_input, food_type)
 
8
 
9
  # Create Gradio application
10
  async def create_demo():
11
  demo = gr.Interface(fn=food_order_interface,
12
- inputs=[gr.Audio(type="filepath", label="Order Food"), # Corrected: Microphone input for audio file
13
  gr.Dropdown(choices=["Starters", "Main Course", "Desserts"], label="Food Type")],
14
  outputs=[gr.Audio(label="Order Confirmation Audio"),
15
  gr.Textbox(label="Confirmed Order Details", interactive=False)],
 
3
  import asyncio
4
 
5
  # Gradio interface function
6
+ async def food_order_interface(audio_input, food_type):
7
+ audio, order_details = await order_assistant.food_order_assistant(audio_input, food_type)
8
+ return audio, order_details
9
 
10
  # Create Gradio application
11
  async def create_demo():
12
  demo = gr.Interface(fn=food_order_interface,
13
+ inputs=[gr.Audio(type="filepath", label="Order Food"), # Microphone input for audio file
14
  gr.Dropdown(choices=["Starters", "Main Course", "Desserts"], label="Food Type")],
15
  outputs=[gr.Audio(label="Order Confirmation Audio"),
16
  gr.Textbox(label="Confirmed Order Details", interactive=False)],