Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,30 +36,24 @@ def respond(message, history):
|
|
36 |
except Exception as e:
|
37 |
yield f"An error occurred: {e}"
|
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/PKA1ZJIlEkJy9yCbJo9Am.png"
|
43 |
-
|
44 |
-
# --- Build the Gradio Interface with Header ---
|
45 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
46 |
-
|
47 |
gr.Image(
|
48 |
value=header_image_path,
|
49 |
label="Chatbot Header",
|
50 |
show_label=False,
|
51 |
interactive=False,
|
52 |
-
height=
|
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=
|
63 |
)
|
64 |
)
|
65 |
|
|
|
36 |
except Exception as e:
|
37 |
yield f"An error occurred: {e}"
|
38 |
|
39 |
+
header_image_path = "https://cdn-uploads.huggingface.co/production/uploads/6540a02d1389943fef4d2640/0pAgc_eH03Encs45e2ri9.png"
|
40 |
|
41 |
|
|
|
|
|
|
|
|
|
42 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
43 |
+
|
44 |
gr.Image(
|
45 |
value=header_image_path,
|
46 |
label="Chatbot Header",
|
47 |
show_label=False,
|
48 |
interactive=False,
|
49 |
+
height=200,
|
|
|
|
|
50 |
elem_id="chatbot-logo"
|
51 |
)
|
52 |
|
|
|
53 |
gr.ChatInterface(
|
54 |
respond,
|
55 |
chatbot=gr.Chatbot(
|
56 |
+
height=600
|
57 |
)
|
58 |
)
|
59 |
|