File size: 534 Bytes
a2afbef
 
8c57d77
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

def walking_assistant(voice_command):
    if voice_command.lower() == 'stop':
        return "Stopping"
    elif voice_command.lower() == 'forward':
        return "Moving Forward"
    elif voice_command.lower() == 'left':
        return "Turning Left"
    elif voice_command.lower() == 'right':
        return "Turning Right"
    else:
        return "Invalid Command"

iface = gr.Interface(fn=walking_assistant, inputs="text", outputs="text", title="Walking Assistant for the Visually Impaired")
iface.launch()