jdmorzan commited on
Commit
167e32c
·
verified ·
1 Parent(s): 59a41a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -76,9 +76,22 @@ def pdf_qa(query, memory, llm):
76
  return chain({"question": query})
77
 
78
  # --------------------------
79
- # Build the Gradio Interface
80
  # --------------------------
81
  with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  # Chatbot component with an initial greeting.
83
  chatbot = gr.Chatbot(
84
  label="Visualizador de futuros",
@@ -99,7 +112,7 @@ with gr.Blocks() as demo:
99
  )
100
 
101
  msg = gr.Textbox(placeholder="Escribe aquí", label='')
102
- submit = gr.Button("Enviar")
103
  memory_state = gr.State(create_memory)
104
 
105
  # Create the ChatOpenAI model with streaming enabled and our custom callback.
@@ -162,4 +175,4 @@ with gr.Blocks() as demo:
162
  msg.submit(user, [msg, chatbot, memory_state], [msg, chatbot, memory_state], queue=True)
163
 
164
  if __name__ == "__main__":
165
- demo.queue().launch()
 
76
  return chain({"question": query})
77
 
78
  # --------------------------
79
+ # Build the Gradio Interface with custom CSS for the "Enviar" button.
80
  # --------------------------
81
  with gr.Blocks() as demo:
82
+ # Inject custom CSS via HTML.
83
+ gr.HTML(
84
+ """
85
+ <style>
86
+ /* Target the button inside the container with id "enviar_button" */
87
+ #enviar_button button {
88
+ background-color: #E50A17 !important;
89
+ color: white !important;
90
+ }
91
+ </style>
92
+ """
93
+ )
94
+
95
  # Chatbot component with an initial greeting.
96
  chatbot = gr.Chatbot(
97
  label="Visualizador de futuros",
 
112
  )
113
 
114
  msg = gr.Textbox(placeholder="Escribe aquí", label='')
115
+ submit = gr.Button("Enviar", elem_id="enviar_button")
116
  memory_state = gr.State(create_memory)
117
 
118
  # Create the ChatOpenAI model with streaming enabled and our custom callback.
 
175
  msg.submit(user, [msg, chatbot, memory_state], [msg, chatbot, memory_state], queue=True)
176
 
177
  if __name__ == "__main__":
178
+ demo.queue().launch()