clean up interface
Browse files
app.py
CHANGED
@@ -105,14 +105,20 @@ def create_chatbot():
|
|
105 |
|
106 |
# ---- Build Gradio Interface ----
|
107 |
with gr.Blocks() as demo:
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
111 |
|
112 |
-
|
113 |
-
|
114 |
|
115 |
-
|
|
|
|
|
|
|
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()
|