frimelle HF Staff commited on
Commit
f9eb9a2
·
1 Parent(s): 023f090

clean up interface

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -105,14 +105,20 @@ def create_chatbot():
105
 
106
  # ---- Build Gradio Interface ----
107
  with gr.Blocks() as demo:
108
- chatbot = gr.ChatInterface(fn=create_chatbot(), title="BoundrAI")
109
- report_btn = gr.Button("Report Companion Interaction")
110
- status_box = gr.Textbox(label="Report Status", interactive=False)
 
 
 
111
 
112
- def report():
113
- return chatbot_instance.report_interaction()
114
 
115
- report_btn.click(fn=report, outputs=status_box)
 
 
 
116
 
117
  if __name__ == "__main__":
118
  demo.launch()
 
105
 
106
  # ---- Build Gradio Interface ----
107
  with gr.Blocks() as demo:
108
+ with gr.Column(scale=1):
109
+ chatbot_ui = gr.ChatInterface(
110
+ fn=create_chatbot(),
111
+ title="BoundrAI",
112
+ textbox=gr.Textbox(placeholder="Ask me anything...", container=True),
113
+ ).style(height=600)
114
 
115
+ report_btn = gr.Button("Report Companion Interaction")
116
+ status_box = gr.Textbox(label="Report Status", interactive=False)
117
 
118
+ def report():
119
+ return chatbot_instance.report_interaction()
120
+
121
+ report_btn.click(fn=report, outputs=status_box)
122
 
123
  if __name__ == "__main__":
124
  demo.launch()