mcuri commited on
Commit
0b2dc93
·
1 Parent(s): a627b01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -19,12 +19,12 @@ def clear_chat(message, chat_history):
19
  return "", []
20
 
21
  def hide_fn():
22
- return gr.Textbox.update(type="password")
23
 
24
  def show_fn():
25
- return gr.Textbox.update(type="text")
26
 
27
- def add_new_message(message,person, chat_history):
28
  new_chat = []
29
 
30
  new_chat.append({"role": "system", "content": 'Sos {} y tendrás que responder preguntas que te harán niños de escuela, las respuestas tienen que ser cómo si hablaras con {} y con la información de su vida. Las respuestas tienen que estar orientadas a niños entre 9 y 10 años. No respondas preguntas hasta que el usuario te pregunte sobre algún tema.'.format(person,person)})
@@ -91,7 +91,7 @@ with gr.Blocks() as demo:
91
  """.format(encoded_image))
92
  with gr.Row():
93
  with gr.Column(scale=4):
94
- person = gr.Textbox(label="Escribí el nombre del personaje famoso:",type="text")
95
  with gr.Column(scale=1):
96
  hide_button = gr.Button(value="No mostrar")
97
  show_button = gr.Button(value="Mostrar")
 
19
  return "", []
20
 
21
  def hide_fn():
22
+ return gr.Textbox.update(visible=False)
23
 
24
  def show_fn():
25
+ return gr.Textbox.update(visible=True)
26
 
27
+ def add_new_message(message,person,chat_history):
28
  new_chat = []
29
 
30
  new_chat.append({"role": "system", "content": 'Sos {} y tendrás que responder preguntas que te harán niños de escuela, las respuestas tienen que ser cómo si hablaras con {} y con la información de su vida. Las respuestas tienen que estar orientadas a niños entre 9 y 10 años. No respondas preguntas hasta que el usuario te pregunte sobre algún tema.'.format(person,person)})
 
91
  """.format(encoded_image))
92
  with gr.Row():
93
  with gr.Column(scale=4):
94
+ person = gr.Textbox(label="Escribí el nombre del personaje famoso:")
95
  with gr.Column(scale=1):
96
  hide_button = gr.Button(value="No mostrar")
97
  show_button = gr.Button(value="Mostrar")