ReyDev commited on
Commit
74b0129
·
unverified ·
1 Parent(s): e6f89d5

🎨 style(app.py, const.py): add CSS to improve layout of Claude Space interface

Browse files
Files changed (2) hide show
  1. claude_space/app.py +5 -1
  2. claude_space/const.py +7 -0
claude_space/app.py CHANGED
@@ -7,6 +7,7 @@ from gradio.utils import async_iteration
7
 
8
  from claude_space.ai import AnthropicCustom
9
  from claude_space.const import (
 
10
  ClaudeDefaultFormatter,
11
  ClaudeModels,
12
  ModelTokenLength,
@@ -255,7 +256,10 @@ with gr.Blocks() as iface:
255
 
256
 
257
  gd = gr.TabbedInterface(
258
- [iface, cface], tab_names=["Claude Evals", "Claude Chat"], title="Claude Space"
 
 
 
259
  )
260
  gd.queue(concurrency_count=75, max_size=100).launch(
261
  debug=True,
 
7
 
8
  from claude_space.ai import AnthropicCustom
9
  from claude_space.const import (
10
+ CSS,
11
  ClaudeDefaultFormatter,
12
  ClaudeModels,
13
  ModelTokenLength,
 
256
 
257
 
258
  gd = gr.TabbedInterface(
259
+ [iface, cface],
260
+ tab_names=["Claude Evals", "Claude Chat"],
261
+ title="Claude Space",
262
+ css=CSS,
263
  )
264
  gd.queue(concurrency_count=75, max_size=100).launch(
265
  debug=True,
claude_space/const.py CHANGED
@@ -1,5 +1,12 @@
1
  import enum
2
 
 
 
 
 
 
 
 
3
 
4
  class ClaudeDefaultFormatter(enum.Enum):
5
  memory: str = "\n\nHuman: {prompt} \n\nConversations: {memory} \n\nQuery: {question} \n\nAssistant:"
 
1
  import enum
2
 
3
+ CSS = """
4
+ .contain { display: flex; flex-direction: column; }
5
+ .gradio-container { height: 100vh !important; }
6
+ #component-0 { height: 100%; }
7
+ #chatbot { flex-grow: 1; overflow: auto;}
8
+ """
9
+
10
 
11
  class ClaudeDefaultFormatter(enum.Enum):
12
  memory: str = "\n\nHuman: {prompt} \n\nConversations: {memory} \n\nQuery: {question} \n\nAssistant:"