Update deployer/gradio_generator.py
Browse files
deployer/gradio_generator.py
CHANGED
|
@@ -19,13 +19,15 @@ def robot_behavior(user_input: str):
|
|
| 19 |
def launch_gradio_app(title="RoboSage App", description="Your robot, your voice."):
|
| 20 |
with gr.Blocks() as demo:
|
| 21 |
gr.Markdown(f"""# 🤖 {title}
|
| 22 |
-
|
| 23 |
""")
|
| 24 |
with gr.Row():
|
| 25 |
inp = gr.Textbox(label="Speak or Type")
|
| 26 |
out = gr.Textbox(label="Robot Response")
|
| 27 |
btn = gr.Button("Send")
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
return demo
|
| 30 |
|
| 31 |
# For testing
|
|
|
|
| 19 |
def launch_gradio_app(title="RoboSage App", description="Your robot, your voice."):
|
| 20 |
with gr.Blocks() as demo:
|
| 21 |
gr.Markdown(f"""# 🤖 {title}
|
| 22 |
+
{description}
|
| 23 |
""")
|
| 24 |
with gr.Row():
|
| 25 |
inp = gr.Textbox(label="Speak or Type")
|
| 26 |
out = gr.Textbox(label="Robot Response")
|
| 27 |
btn = gr.Button("Send")
|
| 28 |
+
|
| 29 |
+
btn.click(fn=robot_behavior, inputs=inp, outputs=out)
|
| 30 |
+
|
| 31 |
return demo
|
| 32 |
|
| 33 |
# For testing
|