AllenYkl commited on
Commit
9ae30d2
·
1 Parent(s): 7d83567

Update bin_public/config/presets.py

Browse files
Files changed (1) hide show
  1. bin_public/config/presets.py +103 -4
bin_public/config/presets.py CHANGED
@@ -4,6 +4,108 @@ description = """<div align=center>
4
  </div>
5
  """
6
  customCSS = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /* 表格 */
8
  table {
9
  margin: 1em 0;
@@ -36,7 +138,7 @@ pre code {
36
  white-space: pre;
37
  background-color: hsla(0, 0%, 0%, 80%)!important;
38
  border-radius: 10px;
39
- padding: 1rem 1.2rem 1rem;
40
  margin: 1.2em 2em 1.2em 0.5em;
41
  color: #FFF;
42
  box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
@@ -111,9 +213,6 @@ pre code {
111
  .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
112
  .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
113
  .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
114
- *{
115
- transition: all 0.6s;
116
- }
117
  """
118
 
119
  SIM_K = 5
 
4
  </div>
5
  """
6
  customCSS = """
7
+ :root {
8
+ --chatbot-color-light: #F3F3F3;
9
+ --chatbot-color-dark: #121111;
10
+ }
11
+
12
+ /* 覆盖gradio的页脚信息QAQ */
13
+ footer {
14
+ display: none !important;
15
+ }
16
+ #footer{
17
+ text-align: center;
18
+ }
19
+ #footer div{
20
+ display: inline-block;
21
+ }
22
+ #footer .versions{
23
+ font-size: 85%;
24
+ opacity: 0.85;
25
+ }
26
+
27
+ /* status_display */
28
+ #status_display {
29
+ display: flex;
30
+ min-height: 2.5em;
31
+ align-items: flex-end;
32
+ justify-content: flex-end;
33
+ }
34
+ #status_display p {
35
+ font-size: .85em;
36
+ font-family: monospace;
37
+ color: var(--body-text-color-subdued);
38
+ }
39
+
40
+ #chuanhu_chatbot, #status_display {
41
+ transition: all 0.6s;
42
+ }
43
+
44
+ /* usage_display */
45
+ #usage_display {
46
+ position: relative;
47
+ margin: 0;
48
+ box-shadow: var(--block-shadow);
49
+ border-width: var(--block-border-width);
50
+ border-color: var(--block-border-color);
51
+ border-radius: var(--block-radius);
52
+ background: var(--block-background-fill);
53
+ width: 100%;
54
+ line-height: var(--line-sm);
55
+ min-height: 2em;
56
+ }
57
+ #usage_display p, #usage_display span {
58
+ margin: 0;
59
+ padding: .5em 1em;
60
+ font-size: .85em;
61
+ color: var(--body-text-color-subdued);
62
+ }
63
+ .progress-bar {
64
+ background-color: var(--input-background-fill);;
65
+ margin: 0 1em;
66
+ height: 20px;
67
+ border-radius: 10px;
68
+ overflow: hidden;
69
+ }
70
+ .progress {
71
+ background-color: var(--block-title-background-fill);;
72
+ height: 100%;
73
+ border-radius: 10px;
74
+ text-align: right;
75
+ transition: width 0.5s ease-in-out;
76
+ }
77
+ .progress-text {
78
+ /* color: white; */
79
+ color: var(--color-accent) !important;
80
+ font-size: 1em !important;
81
+ font-weight: bold;
82
+ padding-right: 10px;
83
+ line-height: 20px;
84
+ }
85
+ /* list */
86
+ ol:not(.options), ul:not(.options) {
87
+ padding-inline-start: 2em !important;
88
+ }
89
+
90
+ /* 对话气泡 */
91
+ [class *= "message"] {
92
+ border-radius: var(--radius-xl) !important;
93
+ border: none;
94
+ padding: var(--spacing-xl) !important;
95
+ font-size: var(--text-md) !important;
96
+ line-height: var(--line-md) !important;
97
+ min-height: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
98
+ min-width: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
99
+ }
100
+ [data-testid = "bot"] {
101
+ max-width: 85%;
102
+ border-bottom-left-radius: 0 !important;
103
+ }
104
+ [data-testid = "user"] {
105
+ max-width: 85%;
106
+ width: auto !important;
107
+ border-bottom-right-radius: 0 !important;
108
+ }
109
  /* 表格 */
110
  table {
111
  margin: 1em 0;
 
138
  white-space: pre;
139
  background-color: hsla(0, 0%, 0%, 80%)!important;
140
  border-radius: 10px;
141
+ padding: 1.4em 1.2em 0em 1.4em;
142
  margin: 1.2em 2em 1.2em 0.5em;
143
  color: #FFF;
144
  box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
 
213
  .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
214
  .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
215
  .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
 
 
 
216
  """
217
 
218
  SIM_K = 5