Komal-patra commited on
Commit
dc0224a
1 Parent(s): 55ece6d
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -53,14 +53,6 @@ span.md.svelte-8tpqd2.chatbot.prose p {
53
  .gradio-container {
54
  background: #1c1c1c; /* Dark background */
55
  color: white; /* Light text color */
56
- height: 100vh; /* Full viewport height */
57
- display: flex;
58
- flex-direction: column;
59
- }
60
- /* Chatbot messages container */
61
- .svelte-1s78gfg {
62
- flex-grow: 1; /* Allow it to grow and take available space */
63
- overflow-y: auto; /* Enable vertical scrolling */
64
  }
65
  /* RED (Hex: #DB1616) for action buttons and links only */
66
  .clear-btn {
@@ -89,16 +81,17 @@ span.md.svelte-8tpqd2.chatbot.prose p {
89
  content: url('file=Komal-patra/EU_AI_ACT/orcawise image.png');
90
  margin-right: 8px;
91
  }
 
 
 
 
 
92
  """
93
 
94
  # Gradio interface setup
95
  with gr.Blocks(css=custom_css) as demo:
96
  with gr.Row():
97
- with gr.Column(scale=1):
98
- gr.Markdown("<h2>My chats</h2>")
99
- chat_topics = gr.Markdown("<!-- Dynamic content -->")
100
-
101
- with gr.Column(scale=3):
102
  gr.Markdown("<h1>Ask a question about the EU AI Act</h1>")
103
  chatbot = gr.Chatbot()
104
  msg = gr.Textbox(placeholder="Ask your question...", show_label=False) # Add placeholder text
@@ -129,4 +122,4 @@ with gr.Blocks(css=custom_css) as demo:
129
  )
130
  clear.click(lambda: None, None, chatbot, queue=False)
131
 
132
- demo.launch(share=True)
 
53
  .gradio-container {
54
  background: #1c1c1c; /* Dark background */
55
  color: white; /* Light text color */
 
 
 
 
 
 
 
 
56
  }
57
  /* RED (Hex: #DB1616) for action buttons and links only */
58
  .clear-btn {
 
81
  content: url('file=Komal-patra/EU_AI_ACT/orcawise image.png');
82
  margin-right: 8px;
83
  }
84
+ /* Enable scrolling for the chatbot messages */
85
+ .chatbot .messages {
86
+ max-height: 500px; /* Adjust as needed */
87
+ overflow-y: auto;
88
+ }
89
  """
90
 
91
  # Gradio interface setup
92
  with gr.Blocks(css=custom_css) as demo:
93
  with gr.Row():
94
+ with gr.Column(scale=3, offset=1): # Adjust column to take full width minus some padding
 
 
 
 
95
  gr.Markdown("<h1>Ask a question about the EU AI Act</h1>")
96
  chatbot = gr.Chatbot()
97
  msg = gr.Textbox(placeholder="Ask your question...", show_label=False) # Add placeholder text
 
122
  )
123
  clear.click(lambda: None, None, chatbot, queue=False)
124
 
125
+ demo.launch()