Kate Forsberg commited on
Commit
eb0eca8
·
1 Parent(s): 02585f2

added checkboxes

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -38,6 +38,12 @@ headers_api = {
38
 
39
  threads = {}
40
 
 
 
 
 
 
 
41
 
42
  def create_thread_id(session_id: str) -> str:
43
  if not session_id in threads:
@@ -195,9 +201,9 @@ def send_message(message: str, history, knowledge_bases, request: gr.Request) ->
195
  response = agent.run(message)
196
  return response.output.value
197
 
198
- with gr.Blocks() as demo:
199
- knowledge_bases = gr.CheckboxGroup(choices=["skills","demographics","linked_in","showreels"])
200
- chatbot = gr.ChatInterface(fn=send_message, additional_inputs=knowledge_bases)
201
  demo.launch(auth=(os.environ.get("GRADIO_USERNAME"), os.environ.get("GRADIO_PASSWORD")))
202
  # demo.launch(share=True)
203
 
 
38
 
39
  threads = {}
40
 
41
+ custom_css = """
42
+ #component-2 {
43
+ height: 75vh !important;
44
+ min-height: 600px !important;
45
+ """
46
+
47
 
48
  def create_thread_id(session_id: str) -> str:
49
  if not session_id in threads:
 
201
  response = agent.run(message)
202
  return response.output.value
203
 
204
+ with gr.Blocks(css=custom_css) as demo:
205
+ knowledge_bases = gr.CheckboxGroup(label="Select Knowledge Bases", choices=["skills","demographics","linked_in","showreels"])
206
+ chatbot = gr.ChatInterface(fn=send_message, chatbot=gr.Chatbot(height=500),additional_inputs=knowledge_bases)
207
  demo.launch(auth=(os.environ.get("GRADIO_USERNAME"), os.environ.get("GRADIO_PASSWORD")))
208
  # demo.launch(share=True)
209