Louis-François Bouchard commited on
Commit
04ac399
·
unverified ·
1 Parent(s): 71cffeb

Theme edit (#27)

Browse files

* changing fonts and colors

* color changes

Files changed (1) hide show
  1. app.py +19 -3
app.py CHANGED
@@ -7,6 +7,14 @@ import pandas as pd
7
 
8
  from buster.completers import Completion
9
 
 
 
 
 
 
 
 
 
10
  import cfg
11
  from cfg import setup_buster
12
 
@@ -160,9 +168,17 @@ def get_answer(history, sources: Optional[list[str]] = None):
160
  # #component-0 { height: 100%; }
161
  # #chatbot { flex-grow: 1; overflow: auto;}
162
  # """
163
- theme = gr.themes.Base()
164
- demo = gr.Blocks(theme=theme)
165
- with demo:
 
 
 
 
 
 
 
 
166
  with gr.Row():
167
  gr.Markdown(
168
  "<h3><center>Toward's AI x Buster 🤖: A Question-Answering Bot for anything AI-related</center></h3>"
 
7
 
8
  from buster.completers import Completion
9
 
10
+ from gradio.themes.utils import (
11
+ colors,
12
+ fonts,
13
+ get_matching_version,
14
+ get_theme_assets,
15
+ sizes,
16
+ )
17
+
18
  import cfg
19
  from cfg import setup_buster
20
 
 
168
  # #component-0 { height: 100%; }
169
  # #chatbot { flex-grow: 1; overflow: auto;}
170
  # """
171
+ theme = gr.themes.Soft()
172
+ # theme.block_background_fill
173
+ # demo = gr.Blocks(theme=theme)
174
+ with gr.Blocks(
175
+ theme=gr.themes.Soft(
176
+ primary_hue="blue",
177
+ secondary_hue="blue",
178
+ font=fonts.GoogleFont("Source Sans Pro"),
179
+ font_mono=fonts.GoogleFont("IBM Plex Mono"),
180
+ )
181
+ ) as demo:
182
  with gr.Row():
183
  gr.Markdown(
184
  "<h3><center>Toward's AI x Buster 🤖: A Question-Answering Bot for anything AI-related</center></h3>"