Spaces:
Build error
Build error
DSatishchandra
commited on
Commit
•
4cd8eb4
1
Parent(s):
68dac82
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
-
import order_assistant #
|
3 |
import asyncio
|
4 |
|
5 |
# Gradio interface function
|
6 |
-
def food_order_interface():
|
7 |
-
return order_assistant.food_order_assistant()
|
8 |
|
9 |
# Create Gradio application
|
10 |
async def create_demo():
|
11 |
demo = gr.Interface(fn=food_order_interface,
|
12 |
-
inputs=[gr.
|
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)],
|
|
|
1 |
import gradio as gr
|
2 |
+
import order_assistant # The module you renamed to 'order_assistant'
|
3 |
import asyncio
|
4 |
|
5 |
# Gradio interface function
|
6 |
+
def food_order_interface(text_input, food_type):
|
7 |
+
return order_assistant.food_order_assistant(text_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(source="microphone", type="text", label="Order Food"),
|
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)],
|