jhangmez commited on
Commit
5119610
1 Parent(s): 453c8c5

Se mejoraron estilos v10

Browse files
Files changed (1) hide show
  1. app.py +37 -25
app.py CHANGED
@@ -9,6 +9,13 @@ import time
9
  import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
 
 
 
 
 
 
 
 
12
  MAX_MAX_NEW_TOKENS = 2048
13
  DEFAULT_MAX_NEW_TOKENS = 1024
14
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
@@ -160,38 +167,43 @@ class SipanGPTTheme(Base):
160
  font_mono=font_mono,
161
  )
162
  self.set(
163
- body_background_fill="*neutral_900",
164
- body_background_fill_dark="*neutral_950",
165
- body_text_color="*neutral_50",
166
- body_text_color_dark="*neutral_50",
167
- color_accent_soft="*secondary_800",
168
  button_primary_background_fill="*primary_600",
169
  button_primary_background_fill_hover="*primary_500",
170
- button_primary_text_color="*neutral_950",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  button_primary_text_color_dark="*neutral_950",
172
- block_title_text_color="*primary_400",
173
  block_title_text_color_dark="*primary_400",
174
- input_background_fill="*neutral_800",
175
- input_background_fill_dark="*neutral_850",
176
- input_border_color="*neutral_700",
177
  input_border_color_dark="*neutral_700",
178
- input_placeholder_color="*neutral_500",
179
  input_placeholder_color_dark="*neutral_400",
180
- # Añadimos más personalizaciones para mejorar el aspecto general
181
- block_background_fill="*neutral_850",
182
- block_background_fill_dark="*neutral_900",
183
- block_label_background_fill="*primary_900",
184
- block_label_background_fill_dark="*primary_950",
185
- block_label_text_color="*neutral_200",
186
- block_label_text_color_dark="*neutral_100",
187
- checkbox_background_color="*neutral_800",
188
- checkbox_background_color_dark="*neutral_850",
189
- checkbox_border_color="*primary_500",
190
  checkbox_border_color_dark="*primary_600",
191
- loader_color="*primary_400",
192
- loader_color_dark="*primary_300",
193
- slider_color="*primary_500",
194
- slider_color_dark="*primary_400",
195
  )
196
 
197
  # Uso del tema
 
9
  import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
 
12
+ DESCRIPTION = """\
13
+ # Llama 3.2 1B Instruct
14
+ Llama 3.2 1B is Meta's latest iteration of open LLMs.
15
+ This is a demo of [`meta-llama/Llama-3.2-3B-Instruct`](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct), fine-tuned for instruction following.
16
+ For more details, please check [our post](https://huggingface.co/blog/llama32).
17
+ """
18
+
19
  MAX_MAX_NEW_TOKENS = 2048
20
  DEFAULT_MAX_NEW_TOKENS = 1024
21
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
 
167
  font_mono=font_mono,
168
  )
169
  self.set(
170
+ # Light mode settings
171
+ body_background_fill="*neutral_50",
172
+ body_text_color="*neutral_900",
173
+ color_accent_soft="*secondary_200",
 
174
  button_primary_background_fill="*primary_600",
175
  button_primary_background_fill_hover="*primary_500",
176
+ button_primary_text_color="*neutral_50",
177
+ block_title_text_color="*primary_600",
178
+ input_background_fill="*neutral_200",
179
+ input_border_color="*neutral_300",
180
+ input_placeholder_color="*neutral_500",
181
+ block_background_fill="*neutral_100",
182
+ block_label_background_fill="*primary_100",
183
+ block_label_text_color="*neutral_800",
184
+ checkbox_background_color="*neutral_200",
185
+ checkbox_border_color="*primary_500",
186
+ loader_color="*primary_500",
187
+ slider_color="*primary_500",
188
+
189
+ # Dark mode settings
190
+ body_background_fill_dark="*neutral_900",
191
+ body_text_color_dark="*neutral_50",
192
+ color_accent_soft_dark="*secondary_800",
193
+ button_primary_background_fill_dark="*primary_700",
194
+ button_primary_background_fill_hover_dark="*primary_600",
195
  button_primary_text_color_dark="*neutral_950",
 
196
  block_title_text_color_dark="*primary_400",
197
+ input_background_fill_dark="*neutral_800",
 
 
198
  input_border_color_dark="*neutral_700",
 
199
  input_placeholder_color_dark="*neutral_400",
200
+ block_background_fill_dark="*neutral_850",
201
+ block_label_background_fill_dark="*primary_900",
202
+ block_label_text_color_dark="*neutral_200",
203
+ checkbox_background_color_dark="*neutral_800",
 
 
 
 
 
 
204
  checkbox_border_color_dark="*primary_600",
205
+ loader_color_dark="*primary_400",
206
+ slider_color_dark="*primary_600",
 
 
207
  )
208
 
209
  # Uso del tema