Daniel00611 commited on
Commit
0af7800
verified
1 Parent(s): 992724b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -172,10 +172,6 @@ def add_domain(domains, new_domain):
172
 
173
  return domains, "" # limpia el textbox
174
 
175
- def respond(message, history, system_message, domains):
176
- domains_list = [d[0] for d in domains if d[0]]
177
- return f"Buscando en: {', '.join(domains_list)}\nMensaje: {message}"
178
-
179
  with gr.Blocks() as demo:
180
  gr.Markdown("### 馃 Buscador especializado en investigaci贸n m茅dica")
181
 
@@ -190,9 +186,14 @@ with gr.Blocks() as demo:
190
  label="Dominios permitidos"
191
  )
192
 
 
 
193
  chat = gr.ChatInterface(
194
  fn=respond,
195
- additional_inputs=[domain_table]
 
 
 
196
  )
197
 
198
  add_button.click(add_domain, [domain_table, new_domain], [domain_table, new_domain])
 
172
 
173
  return domains, "" # limpia el textbox
174
 
 
 
 
 
175
  with gr.Blocks() as demo:
176
  gr.Markdown("### 馃 Buscador especializado en investigaci贸n m茅dica")
177
 
 
186
  label="Dominios permitidos"
187
  )
188
 
189
+ custom_chatbot = gr.Chatbot(height=500, label="Chat M茅dico AI")
190
+
191
  chat = gr.ChatInterface(
192
  fn=respond,
193
+ chatbot=custom_chatbot,
194
+ additional_inputs=[domain_table],
195
+ title="馃 Buscador especializado en investigaci贸n m茅dica",
196
+ description="Agrega tus dominios arriba para limitar la b煤squeda"
197
  )
198
 
199
  add_button.click(add_domain, [domain_table, new_domain], [domain_table, new_domain])