21spl commited on
Commit
3abfacf
·
verified ·
1 Parent(s): afd8caf

Update app.py

Browse files

updated UI with custom gradio interface

Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -44,5 +44,20 @@ agent = CodeAgent(
44
  max_print_outputs_length=None,
45
  prompt_templates=prompt_templates
46
  )
47
- if __name__ == "__main__":
48
- GradioUI(agent).launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()