darkc0de commited on
Commit
276460c
·
verified ·
1 Parent(s): ae2739a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -3
app.py CHANGED
@@ -38,10 +38,30 @@ def respond(message, history):
38
 
39
 
40
 
41
- with gr.Blocks(gr.themes.Soft()) as demo:
42
- gr.ChatInterface(respond, chatbot=gr.Chatbot(height=800))
43
- gr.themes.Soft()
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  if __name__ == "__main__":
47
  demo.launch(show_api=True, share=False)
 
38
 
39
 
40
 
41
+ # --- Define the path or URL to your header image ---
42
+ header_image_path = "https://cdn-uploads.huggingface.co/production/uploads/6540a02d1389943fef4d2640/W1et5K7SPcIa2jdTRIMIG.jpeg"
 
43
 
44
+ # --- Build the Gradio Interface with Header ---
45
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
46
+ # Add the header image component with doubled height
47
+ gr.Image(
48
+ value=header_image_path,
49
+ label="Chatbot Header",
50
+ show_label=False,
51
+ interactive=False,
52
+ height=240, # Doubled height (was 120)
53
+ # width=..., # Width will usually scale automatically with height,
54
+ # but you could set it explicitly if needed, e.g., width=600
55
+ elem_id="chatbot-logo"
56
+ )
57
+
58
+ # Add your ChatInterface below the image with reduced height
59
+ gr.ChatInterface(
60
+ respond,
61
+ chatbot=gr.Chatbot(
62
+ height=560 # Reduced height further (was 680)
63
+ )
64
+ )
65
 
66
  if __name__ == "__main__":
67
  demo.launch(show_api=True, share=False)