StevenMSAI commited on
Commit
f04be6a
·
verified ·
1 Parent(s): ffc6e81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -155,17 +155,25 @@ chatbot_component = gr.Chatbot(
155
  show_label=False,
156
  )
157
 
158
- # Put the decorative welcome image ABOVE the chat (not inside history)
159
- with gr.Blocks() as demo:
160
  if os.path.exists(WELCOME_IMAGE_PATH):
161
- gr.Image(value=WELCOME_IMAGE_PATH, show_label=False, interactive=False)
 
 
 
 
 
 
 
162
  gr.ChatInterface(
163
  fn=reply,
164
  title="😺 Cats of Ancient Egypt Chatbot 😺",
165
- chatbot=chatbot_component,
166
  type="messages",
167
  )
168
 
 
169
  # -------- Launch (SSR off + Spaces-friendly) --------
170
  if __name__ == "__main__":
171
  demo.launch(
 
155
  show_label=False,
156
  )
157
 
158
+ # UI (banner is collapsible so it won't push the input off-screen)
159
+ with gr.Blocks(fill_height=True) as demo:
160
  if os.path.exists(WELCOME_IMAGE_PATH):
161
+ with gr.Accordion("Show banner", open=False):
162
+ gr.Image(
163
+ value=WELCOME_IMAGE_PATH,
164
+ show_label=False,
165
+ interactive=False,
166
+ container=False,
167
+ height=200
168
+ )
169
  gr.ChatInterface(
170
  fn=reply,
171
  title="😺 Cats of Ancient Egypt Chatbot 😺",
172
+ chatbot=chatbot_component, # already defined above
173
  type="messages",
174
  )
175
 
176
+
177
  # -------- Launch (SSR off + Spaces-friendly) --------
178
  if __name__ == "__main__":
179
  demo.launch(