refactor: examples
Browse files
app.py
CHANGED
@@ -57,6 +57,10 @@ session_id_input = gr.Textbox(
|
|
57 |
placeholder="Ingresa el ID de tu sesion"
|
58 |
)
|
59 |
|
|
|
|
|
|
|
|
|
60 |
def dynamic_examples():
|
61 |
examples = [
|
62 |
["Hola","Departamento en Venta en la Colonia Obrera, 脕ngel del Campo" ,"6072ef21835a01fee0f14ace35e5d814", generate_session_id()],
|
@@ -67,7 +71,7 @@ def dynamic_examples():
|
|
67 |
|
68 |
demo = gr.ChatInterface(fn=slow_api_response,
|
69 |
title="AI Assistant",
|
70 |
-
additional_inputs=[
|
71 |
description="Esta app simula una conversaci贸n con un asistente virtual que conoce una propiedad.",
|
72 |
examples=dynamic_examples()
|
73 |
).launch()
|
|
|
57 |
placeholder="Ingresa el ID de tu sesion"
|
58 |
)
|
59 |
|
60 |
+
title_input = gr.Textbox(
|
61 |
+
label="Title"
|
62 |
+
)
|
63 |
+
|
64 |
def dynamic_examples():
|
65 |
examples = [
|
66 |
["Hola","Departamento en Venta en la Colonia Obrera, 脕ngel del Campo" ,"6072ef21835a01fee0f14ace35e5d814", generate_session_id()],
|
|
|
71 |
|
72 |
demo = gr.ChatInterface(fn=slow_api_response,
|
73 |
title="AI Assistant",
|
74 |
+
additional_inputs=[title_input,property_id_input, session_id_input],
|
75 |
description="Esta app simula una conversaci贸n con un asistente virtual que conoce una propiedad.",
|
76 |
examples=dynamic_examples()
|
77 |
).launch()
|