giannantonio15 commited on
Commit
98ed31f
1 Parent(s): 44e9e50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -107,6 +107,14 @@ css = """
107
  width: 12%
108
  }
109
 
 
 
 
 
 
 
 
 
110
  """
111
  user_message=""
112
  current_chat_mode=""
@@ -365,14 +373,13 @@ def main():
365
 
366
  set_chat_engine()
367
  with gr.Blocks(css=css, head=head) as demo:
368
-
369
  with gr.Row():
 
370
  with gr.Row(elem_id="buttonChat"):
371
  gr.Button("STANDARD", size="sm").click(fn=select_standard_mode, outputs=output)
372
  gr.Button("CHAT",size="sm").click(fn=select_chat_mode, outputs=output)
373
 
374
  chatbot = gr.Chatbot(elem_id="chatbot", container=False)
375
- output = gr.HTML()
376
 
377
  with gr.Column(elem_id="colonnaElementi"):
378
  gr.Dropdown(
@@ -380,7 +387,9 @@ def main():
380
  ).select(fn=select_collection, outputs=output)
381
 
382
  gr.Radio(["compact","tree_summarize"], label="Response mode", info="Influenzerà il modo in cui il chatbot risponde", interactive=True,container=False, value="tree_summarize",elem_id="responseMode").select(fn=select_response_mode, outputs=output),
 
383
  divDocumenti = gr.HTML("<div id='divDocumenti'></div>")
 
384
  msg = gr.Textbox(elem_id="textBox", container=False)
385
  clear = gr.ClearButton([msg, chatbot], elem_id="btnClear")
386
  clear.click(fn=reset, outputs=output)
 
107
  width: 12%
108
  }
109
 
110
+ #dropdown{
111
+ position: relative;
112
+ }
113
+
114
+ #divDocumenti{
115
+ position: relative;
116
+ }
117
+
118
  """
119
  user_message=""
120
  current_chat_mode=""
 
373
 
374
  set_chat_engine()
375
  with gr.Blocks(css=css, head=head) as demo:
 
376
  with gr.Row():
377
+ output = gr.HTML()
378
  with gr.Row(elem_id="buttonChat"):
379
  gr.Button("STANDARD", size="sm").click(fn=select_standard_mode, outputs=output)
380
  gr.Button("CHAT",size="sm").click(fn=select_chat_mode, outputs=output)
381
 
382
  chatbot = gr.Chatbot(elem_id="chatbot", container=False)
 
383
 
384
  with gr.Column(elem_id="colonnaElementi"):
385
  gr.Dropdown(
 
387
  ).select(fn=select_collection, outputs=output)
388
 
389
  gr.Radio(["compact","tree_summarize"], label="Response mode", info="Influenzerà il modo in cui il chatbot risponde", interactive=True,container=False, value="tree_summarize",elem_id="responseMode").select(fn=select_response_mode, outputs=output),
390
+
391
  divDocumenti = gr.HTML("<div id='divDocumenti'></div>")
392
+
393
  msg = gr.Textbox(elem_id="textBox", container=False)
394
  clear = gr.ClearButton([msg, chatbot], elem_id="btnClear")
395
  clear.click(fn=reset, outputs=output)