jhangmez commited on
Commit
a78d902
1 Parent(s): 369f6d3

Se mejoraron estilos v6

Browse files
Files changed (1) hide show
  1. app.py +17 -16
app.py CHANGED
@@ -5,6 +5,7 @@ from typing import Iterator
5
  import gradio as gr
6
  from gradio.themes.base import Base
7
  from gradio.themes.utils import colors, sizes, fonts
 
8
  import torch
9
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
10
 
@@ -136,17 +137,17 @@ class SipanGPTTheme(Base):
136
  spacing_size: sizes.Size | str = sizes.spacing_md,
137
  radius_size: sizes.Size | str = sizes.radius_md,
138
  text_size: sizes.Size | str = sizes.text_md,
139
- font: fonts.Font | str | list[fonts.Font | str] = (
140
  fonts.GoogleFont("Exo 2"),
141
  "ui-sans-serif",
142
  "system-ui",
143
  "sans-serif",
144
- ),
145
- font_mono: fonts.Font | str | list[fonts.Font | str] = (
146
  fonts.GoogleFont("Fraunces"),
147
  "ui-monospace",
148
  "monospace",
149
- ),
150
  ):
151
  super().__init__(
152
  primary_hue=primary_hue,
@@ -159,23 +160,23 @@ class SipanGPTTheme(Base):
159
  font_mono=font_mono,
160
  )
161
  self.set(
162
- body_background_fill="#333333",
163
- body_background_fill_dark="#333333",
164
- body_text_color="#ffffff",
165
- body_text_color_dark="#ffffff",
166
  color_accent_soft="*secondary_200",
167
  button_primary_background_fill="*primary_400",
168
  button_primary_background_fill_hover="*primary_500",
169
- button_primary_text_color="#333333",
170
- button_primary_text_color_dark="#333333",
171
  block_title_text_color="*primary_400",
172
  block_title_text_color_dark="*primary_400",
173
- input_background_fill="#444444",
174
- input_background_fill_dark="#444444",
175
- input_border_color="#555555",
176
- input_border_color_dark="#555555",
177
- input_placeholder_color="#888888",
178
- input_placeholder_color_dark="#888888",
179
  )
180
 
181
  # Uso del tema
 
5
  import gradio as gr
6
  from gradio.themes.base import Base
7
  from gradio.themes.utils import colors, sizes, fonts
8
+ import time
9
  import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
 
 
137
  spacing_size: sizes.Size | str = sizes.spacing_md,
138
  radius_size: sizes.Size | str = sizes.radius_md,
139
  text_size: sizes.Size | str = sizes.text_md,
140
+ font: fonts.Font | str | list[fonts.Font | str] = [
141
  fonts.GoogleFont("Exo 2"),
142
  "ui-sans-serif",
143
  "system-ui",
144
  "sans-serif",
145
+ ],
146
+ font_mono: fonts.Font | str | list[fonts.Font | str] = [
147
  fonts.GoogleFont("Fraunces"),
148
  "ui-monospace",
149
  "monospace",
150
+ ],
151
  ):
152
  super().__init__(
153
  primary_hue=primary_hue,
 
160
  font_mono=font_mono,
161
  )
162
  self.set(
163
+ body_background_fill=colors.Color(hex="#333333"),
164
+ body_background_fill_dark=colors.Color(hex="#333333"),
165
+ body_text_color=colors.Color(hex="#ffffff"),
166
+ body_text_color_dark=colors.Color(hex="#ffffff"),
167
  color_accent_soft="*secondary_200",
168
  button_primary_background_fill="*primary_400",
169
  button_primary_background_fill_hover="*primary_500",
170
+ button_primary_text_color=colors.Color(hex="#333333"),
171
+ button_primary_text_color_dark=colors.Color(hex="#333333"),
172
  block_title_text_color="*primary_400",
173
  block_title_text_color_dark="*primary_400",
174
+ input_background_fill=colors.Color(hex="#444444"),
175
+ input_background_fill_dark=colors.Color(hex="#444444"),
176
+ input_border_color=colors.Color(hex="#555555"),
177
+ input_border_color_dark=colors.Color(hex="#555555"),
178
+ input_placeholder_color=colors.Color(hex="#888888"),
179
+ input_placeholder_color_dark=colors.Color(hex="#888888"),
180
  )
181
 
182
  # Uso del tema