Spaces:
Sleeping
Sleeping
mmccanse
commited on
Commit
·
75ef897
1
Parent(s):
87a8f85
update with theme placeholder
Browse files
app.py
CHANGED
@@ -48,6 +48,83 @@ from functions_mm import handle_query, transcribe_audio_original, submit_questio
|
|
48 |
# # Store the API key in a variable.
|
49 |
# OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# In[5]:
|
53 |
|
|
|
48 |
# # Store the API key in a variable.
|
49 |
# OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
50 |
|
51 |
+
import gradio as gr
|
52 |
+
|
53 |
+
theme = gr.themes.Soft(
|
54 |
+
secondary_hue="rose",
|
55 |
+
neutral_hue="slate",
|
56 |
+
font=[gr.themes.GoogleFont('Source Sans Pro'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
57 |
+
).set(
|
58 |
+
background_fill_primary='white',
|
59 |
+
|
60 |
+
#change background color here
|
61 |
+
body_background_fill='*primary_100',
|
62 |
+
|
63 |
+
shadow_drop='rgba(0,0,0,0.05) 0px 1px 2px 0px',
|
64 |
+
shadow_drop_lg='0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
65 |
+
shadow_spread='3px',
|
66 |
+
block_background_fill='*background_fill_primary',
|
67 |
+
block_border_width='1px',
|
68 |
+
block_border_width_dark='1px',
|
69 |
+
block_label_background_fill='*background_fill_primary',
|
70 |
+
block_label_background_fill_dark='*background_fill_secondary',
|
71 |
+
block_label_text_color='*neutral_500',
|
72 |
+
block_label_text_color_dark='*neutral_200',
|
73 |
+
block_label_margin='0',
|
74 |
+
block_label_padding='*spacing_sm *spacing_lg',
|
75 |
+
block_label_radius='calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px) 0',
|
76 |
+
block_label_text_size='*text_sm',
|
77 |
+
block_label_text_weight='400',
|
78 |
+
block_title_background_fill='none',
|
79 |
+
block_title_background_fill_dark='none',
|
80 |
+
block_title_text_color='*neutral_500',
|
81 |
+
block_title_text_color_dark='*neutral_200',
|
82 |
+
block_title_padding='0',
|
83 |
+
block_title_radius='none',
|
84 |
+
block_title_text_weight='400',
|
85 |
+
panel_border_width='0',
|
86 |
+
panel_border_width_dark='0',
|
87 |
+
checkbox_background_color_selected='*secondary_600',
|
88 |
+
checkbox_background_color_selected_dark='*secondary_600',
|
89 |
+
checkbox_border_color='*neutral_300',
|
90 |
+
checkbox_border_color_dark='*neutral_700',
|
91 |
+
checkbox_border_color_focus='*secondary_500',
|
92 |
+
checkbox_border_color_focus_dark='*secondary_500',
|
93 |
+
checkbox_border_color_selected='*secondary_600',
|
94 |
+
checkbox_border_color_selected_dark='*secondary_600',
|
95 |
+
checkbox_border_width='*input_border_width',
|
96 |
+
checkbox_shadow='*input_shadow',
|
97 |
+
checkbox_label_background_fill_selected='*checkbox_label_background_fill',
|
98 |
+
checkbox_label_background_fill_selected_dark='*checkbox_label_background_fill',
|
99 |
+
checkbox_label_shadow='none',
|
100 |
+
checkbox_label_text_color_selected='*checkbox_label_text_color',
|
101 |
+
input_background_fill='*neutral_100',
|
102 |
+
input_border_color='*border_color_primary',
|
103 |
+
input_shadow='none',
|
104 |
+
input_shadow_dark='none',
|
105 |
+
input_shadow_focus='*input_shadow',
|
106 |
+
input_shadow_focus_dark='*input_shadow',
|
107 |
+
slider_color='#2563eb',
|
108 |
+
slider_color_dark='#2563eb',
|
109 |
+
button_shadow='none',
|
110 |
+
button_shadow_active='none',
|
111 |
+
button_shadow_hover='none',
|
112 |
+
|
113 |
+
#change button color here
|
114 |
+
button_primary_background_fill='*primary_300',
|
115 |
+
button_primary_background_fill_hover='*button_primary_background_fill',
|
116 |
+
button_primary_background_fill_hover_dark='*button_primary_background_fill',
|
117 |
+
button_primary_text_color='*primary_600',
|
118 |
+
|
119 |
+
#change button color here
|
120 |
+
button_secondary_background_fill='*secondary_500',
|
121 |
+
button_secondary_background_fill_hover='*button_secondary_background_fill',
|
122 |
+
button_secondary_background_fill_hover_dark='*button_secondary_background_fill',
|
123 |
+
button_secondary_text_color='*neutral_700',
|
124 |
+
button_cancel_background_fill_hover='*button_cancel_background_fill',
|
125 |
+
button_cancel_background_fill_hover_dark='*button_cancel_background_fill'
|
126 |
+
)
|
127 |
+
|
128 |
|
129 |
# In[5]:
|
130 |
|