C2MV commited on
Commit
98bd34e
1 Parent(s): 90a9a31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -1
app.py CHANGED
@@ -11,6 +11,62 @@ from datasets import Dataset
11
  from sentence_transformers import SentenceTransformer
12
  import gradio as gr
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  model_name = "BAAI/bge-m3"
15
 
16
  # Retrieve the Pinecone API key from the user
@@ -309,7 +365,7 @@ images = [
309
 
310
 
311
  # Gradio layout setup
312
- with gr.Blocks() as demo:
313
  with gr.Row():
314
  with gr.Column(scale=1):
315
  # Agregar el video al inicio
 
11
  from sentence_transformers import SentenceTransformer
12
  import gradio as gr
13
 
14
+
15
+ #TEMA GRADIO
16
+ import gradio as gr
17
+
18
+ theme = gr.themes.Default(
19
+ primary_hue=gr.themes.Color(c100="#83a1c9", c200="#000000", c300="#a5b4fc", c400="#818cf8", c50="#ffffff", c500="#6366f1", c600="#4f46e5", c700="#4338ca", c800="#3730a3", c900="#312e81", c950="#2b2c5e"),
20
+ secondary_hue=gr.themes.Color(c100="#ffffff", c200="#9ab9d5", c300="#000000", c400="#000000", c50="#ffffff", c500="#000000", c600="#000000", c700="#000000", c800="#3730a3", c900="#312e81", c950="#2b2c5e"),
21
+ neutral_hue=gr.themes.Color(c100="#e0e7ff", c200="#c7d2fe", c300="#658fd2", c400="#ffffff", c50="#eef2ff", c500="#ffffff", c600="#191a2f", c700="#29357f", c800="#4463a2", c900="#545acf", c950="#1a1a1f"),
22
+ ).set(
23
+ background_fill_primary='*background_fill_secondary',
24
+ border_color_accent_subdued='*border_color_accent',
25
+ link_text_color='*primary_50',
26
+ link_text_color_dark='*primary_50',
27
+ link_text_color_active='*primary_50',
28
+ block_shadow='none',
29
+ block_shadow_dark='none',
30
+ form_gap_width='0px',
31
+ checkbox_label_background_fill='*button_secondary_background_fill',
32
+ checkbox_label_background_fill_dark='*button_secondary_background_fill',
33
+ checkbox_label_background_fill_hover='*button_secondary_background_fill_hover',
34
+ checkbox_label_background_fill_hover_dark='*button_secondary_background_fill_hover',
35
+ checkbox_label_shadow='none',
36
+ error_background_fill_dark='*background_fill_primary',
37
+ input_background_fill='*neutral_100',
38
+ input_background_fill_dark='*neutral_700',
39
+ input_border_width='0px',
40
+ input_border_width_dark='0px',
41
+ input_shadow='none',
42
+ input_shadow_dark='none',
43
+ input_shadow_focus='*input_shadow',
44
+ input_shadow_focus_dark='*input_shadow',
45
+ stat_background_fill='*primary_300',
46
+ stat_background_fill_dark='*primary_500',
47
+ button_shadow='none',
48
+ button_shadow_active='none',
49
+ button_shadow_hover='none',
50
+ button_transition='background-color 0.2s ease',
51
+ button_primary_background_fill='*primary_200',
52
+ button_primary_background_fill_dark='*primary_700',
53
+ button_primary_background_fill_hover='*button_primary_background_fill',
54
+ button_primary_background_fill_hover_dark='*button_primary_background_fill',
55
+ button_primary_border_color_dark='*primary_600',
56
+ button_secondary_background_fill='*neutral_200',
57
+ button_secondary_background_fill_dark='*neutral_600',
58
+ button_secondary_background_fill_hover='*button_secondary_background_fill',
59
+ button_secondary_background_fill_hover_dark='*button_secondary_background_fill',
60
+ button_cancel_background_fill='*button_secondary_background_fill',
61
+ button_cancel_background_fill_dark='*button_secondary_background_fill',
62
+ button_cancel_background_fill_hover='*button_cancel_background_fill',
63
+ button_cancel_background_fill_hover_dark='*button_cancel_background_fill',
64
+ button_cancel_border_color='*button_secondary_border_color',
65
+ button_cancel_border_color_dark='*button_secondary_border_color',
66
+ button_cancel_text_color='*button_secondary_text_color',
67
+ button_cancel_text_color_dark='*button_secondary_text_color'
68
+ )
69
+
70
  model_name = "BAAI/bge-m3"
71
 
72
  # Retrieve the Pinecone API key from the user
 
365
 
366
 
367
  # Gradio layout setup
368
+ with gr.Blocks(theme=theme) as demo:
369
  with gr.Row():
370
  with gr.Column(scale=1):
371
  # Agregar el video al inicio