Spaces:
Build error
Build error
File size: 1,033 Bytes
07de9e8 4cd8eb4 3d3c5c6 4cd8eb4 3d3c5c6 4cd8eb4 3d3c5c6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
import order_assistant # The module you renamed to 'order_assistant'
import asyncio
# Gradio interface function
def food_order_interface(text_input, food_type):
return order_assistant.food_order_assistant(text_input, food_type)
# Create Gradio application
async def create_demo():
demo = gr.Interface(fn=food_order_interface,
inputs=[gr.Audio(source="microphone", type="text", label="Order Food"),
gr.Dropdown(choices=["Starters", "Main Course", "Desserts"], label="Food Type")],
outputs=[gr.Audio(label="Order Confirmation Audio"),
gr.Textbox(label="Confirmed Order Details", interactive=False)],
title="AI Restaurant Voice Ordering",
description="Order food easily with the AI assistant's voice ordering system.")
return demo
# Run the application
if __name__ == "__main__":
demo = asyncio.run(create_demo())
demo.launch()
|