Spaces:
Sleeping
Sleeping
Fixing css
Browse files
app.py
CHANGED
@@ -151,6 +151,14 @@ chat_interface = gr.ChatInterface(
|
|
151 |
["How does Kant's Categorical Imperative work?"],
|
152 |
["What is the problem of consciousness in philosophy of mind?"],
|
153 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
)
|
155 |
|
156 |
with gr.Blocks(css="style.css") as demo:
|
|
|
151 |
["How does Kant's Categorical Imperative work?"],
|
152 |
["What is the problem of consciousness in philosophy of mind?"],
|
153 |
],
|
154 |
+
title="Philosophy Chat with Llama 3.1",
|
155 |
+
theme=gr.themes.Default(
|
156 |
+
text_alignment="left",
|
157 |
+
),
|
158 |
+
chatbot=gr.Chatbot(
|
159 |
+
show_label=False,
|
160 |
+
avatar_images=(None, None),
|
161 |
+
),
|
162 |
)
|
163 |
|
164 |
with gr.Blocks(css="style.css") as demo:
|
style.css
CHANGED
@@ -14,23 +14,41 @@ h1 {
|
|
14 |
max-width: 900px;
|
15 |
margin: auto;
|
16 |
padding-top: 1.5rem;
|
17 |
-
max-height: none !important;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
|
|
|
|
22 |
}
|
23 |
|
24 |
-
.
|
25 |
height: auto !important;
|
26 |
-
|
27 |
}
|
28 |
|
29 |
-
.
|
30 |
-
|
31 |
}
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
|
|
14 |
max-width: 900px;
|
15 |
margin: auto;
|
16 |
padding-top: 1.5rem;
|
|
|
17 |
}
|
18 |
|
19 |
+
/* Prevent auto-scrolling behavior */
|
20 |
+
.chatbot {
|
21 |
+
height: 600px !important;
|
22 |
+
overflow-y: auto !important;
|
23 |
}
|
24 |
|
25 |
+
.chatbot-container {
|
26 |
height: auto !important;
|
27 |
+
overflow: visible !important;
|
28 |
}
|
29 |
|
30 |
+
.message-wrap {
|
31 |
+
overflow: visible !important;
|
32 |
}
|
33 |
|
34 |
+
/* Fix input area */
|
35 |
+
.input-row {
|
36 |
+
position: sticky !important;
|
37 |
+
bottom: 0 !important;
|
38 |
+
background: var(--background-fill-primary);
|
39 |
+
padding: 1rem 0;
|
40 |
+
margin: 0;
|
41 |
+
}
|
42 |
+
|
43 |
+
/* Ensure chat container doesn't jump */
|
44 |
+
#chatbot {
|
45 |
+
min-height: 400px;
|
46 |
+
max-height: 600px;
|
47 |
+
overflow-y: auto;
|
48 |
+
scroll-behavior: smooth;
|
49 |
+
}
|
50 |
+
|
51 |
+
/* Disable auto-scroll */
|
52 |
+
.scroll-lock {
|
53 |
+
overflow: hidden !important;
|
54 |
}
|