Spaces:
Sleeping
Sleeping
DeepMount00
commited on
Commit
โข
cba619e
1
Parent(s):
ced5932
Update app.py
Browse files
app.py
CHANGED
@@ -19,15 +19,63 @@ DESCRIPTION = """\
|
|
19 |
# Lexora 7B ITA ๐ฌ ๐ฎ๐น
|
20 |
"""
|
21 |
|
22 |
-
#
|
23 |
CUSTOM_CSS = """
|
24 |
-
.
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
"""
|
32 |
|
33 |
MAX_MAX_NEW_TOKENS = 2048
|
@@ -148,11 +196,12 @@ chat_interface = gr.ChatInterface(
|
|
148 |
cache_examples=False,
|
149 |
)
|
150 |
|
151 |
-
with gr.Blocks(css=CUSTOM_CSS, fill_height=True, theme=gr.themes.
|
152 |
with gr.Column(elem_classes="contain"):
|
153 |
gr.Markdown(DESCRIPTION)
|
154 |
gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
155 |
-
|
|
|
156 |
|
157 |
if __name__ == "__main__":
|
158 |
demo.queue(max_size=20).launch()
|
|
|
19 |
# Lexora 7B ITA ๐ฌ ๐ฎ๐น
|
20 |
"""
|
21 |
|
22 |
+
# Updated CSS to ensure full height and proper scrolling
|
23 |
CUSTOM_CSS = """
|
24 |
+
.gradio-container {
|
25 |
+
height: 100vh !important;
|
26 |
+
max-height: 100vh !important;
|
27 |
+
padding: 0 !important;
|
28 |
+
background-color: #0f1117;
|
29 |
+
}
|
30 |
+
|
31 |
+
.contain {
|
32 |
+
height: 100vh !important;
|
33 |
+
max-height: 100vh !important;
|
34 |
+
display: flex;
|
35 |
+
flex-direction: column;
|
36 |
+
}
|
37 |
+
|
38 |
+
.main-container {
|
39 |
+
flex-grow: 1;
|
40 |
+
height: calc(100vh - 100px) !important;
|
41 |
+
overflow: hidden !important;
|
42 |
+
}
|
43 |
+
|
44 |
+
.chat-container {
|
45 |
+
height: 100% !important;
|
46 |
+
overflow: hidden !important;
|
47 |
+
display: flex;
|
48 |
+
flex-direction: column;
|
49 |
+
}
|
50 |
+
|
51 |
+
.chat-messages {
|
52 |
+
flex-grow: 1;
|
53 |
+
overflow-y: auto !important;
|
54 |
+
padding: 1rem;
|
55 |
+
}
|
56 |
+
|
57 |
+
.message-wrap {
|
58 |
+
height: auto !important;
|
59 |
+
max-height: none !important;
|
60 |
+
}
|
61 |
+
|
62 |
+
.message {
|
63 |
+
padding: 1rem !important;
|
64 |
+
margin: 0.5rem 0 !important;
|
65 |
+
border-radius: 0.5rem !important;
|
66 |
+
}
|
67 |
+
|
68 |
+
.user-message {
|
69 |
+
background-color: #2b2d31 !important;
|
70 |
+
}
|
71 |
+
|
72 |
+
.bot-message {
|
73 |
+
background-color: #1e1f23 !important;
|
74 |
+
}
|
75 |
+
|
76 |
+
.examples-container {
|
77 |
+
margin-top: auto;
|
78 |
+
}
|
79 |
"""
|
80 |
|
81 |
MAX_MAX_NEW_TOKENS = 2048
|
|
|
196 |
cache_examples=False,
|
197 |
)
|
198 |
|
199 |
+
with gr.Blocks(css=CUSTOM_CSS, fill_height=True, theme=gr.themes.Base()) as demo:
|
200 |
with gr.Column(elem_classes="contain"):
|
201 |
gr.Markdown(DESCRIPTION)
|
202 |
gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
203 |
+
with gr.Column(elem_classes="main-container"):
|
204 |
+
chat_interface.render()
|
205 |
|
206 |
if __name__ == "__main__":
|
207 |
demo.queue(max_size=20).launch()
|