Spaces:
Sleeping
Sleeping
Update app.py
Browse filesupdated UI with custom gradio interface
app.py
CHANGED
|
@@ -44,5 +44,20 @@ agent = CodeAgent(
|
|
| 44 |
max_print_outputs_length=None,
|
| 45 |
prompt_templates=prompt_templates
|
| 46 |
)
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
max_print_outputs_length=None,
|
| 45 |
prompt_templates=prompt_templates
|
| 46 |
)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
import gradio as gr
|
| 50 |
+
|
| 51 |
+
def agent_response(user_input):
|
| 52 |
+
return agent.run(user_input)
|
| 53 |
+
|
| 54 |
+
with gr.Blocks() as demo:
|
| 55 |
+
gr.Markdown("# 🎩 Band Baaja Bot - Your Wedding Assistant! 💍")
|
| 56 |
+
with gr.Row():
|
| 57 |
+
user_input = gr.Textbox(label="Your Request", placeholder="Ask me anything about wedding planning...")
|
| 58 |
+
output = gr.Textbox(label="Agent Response")
|
| 59 |
+
submit = gr.Button("Submit")
|
| 60 |
+
|
| 61 |
+
submit.click(agent_response, inputs=user_input, outputs=output)
|
| 62 |
+
|
| 63 |
+
demo.launch()
|