Spaces:
Sleeping
Sleeping
Commit
路
f47be50
1
Parent(s):
2f88fb9
Update app.py
Browse files
app.py
CHANGED
@@ -51,21 +51,16 @@ def error_message_fn(error_message):
|
|
51 |
else:
|
52 |
return None
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
choices_with_preview = []
|
58 |
-
for image_path in choices:
|
59 |
-
image = Image.open(image_path)
|
60 |
-
choices_with_preview.append((image))
|
61 |
-
return choices_with_preview
|
62 |
|
63 |
iface = gr.Interface(
|
64 |
fn=generate_output,
|
65 |
inputs=[
|
66 |
gr.inputs.Textbox(lines=1, label="Nombre", placeholder="Ingresa tu nombre"),
|
67 |
gr.inputs.Textbox(lines=1, label="Fecha de Nacimiento", placeholder="DD/MM/AAAA"),
|
68 |
-
gr.inputs.
|
69 |
],
|
70 |
outputs=[
|
71 |
gr.outputs.Video(label="Respuesta de Andrea (un minuto aproximadamente)").style(width=256),
|
@@ -76,4 +71,4 @@ iface = gr.Interface(
|
|
76 |
description="Por favor, ingresa tu nombre y fecha de nacimiento."
|
77 |
)
|
78 |
|
79 |
-
iface.launch()
|
|
|
51 |
else:
|
52 |
return None
|
53 |
|
54 |
+
import gradio as gr
|
55 |
|
56 |
+
choices = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg"]
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
iface = gr.Interface(
|
59 |
fn=generate_output,
|
60 |
inputs=[
|
61 |
gr.inputs.Textbox(lines=1, label="Nombre", placeholder="Ingresa tu nombre"),
|
62 |
gr.inputs.Textbox(lines=1, label="Fecha de Nacimiento", placeholder="DD/MM/AAAA"),
|
63 |
+
gr.inputs.Radio(label="Selecciona una imagen:", choices=choices, default=choices[0], preview=True)
|
64 |
],
|
65 |
outputs=[
|
66 |
gr.outputs.Video(label="Respuesta de Andrea (un minuto aproximadamente)").style(width=256),
|
|
|
71 |
description="Por favor, ingresa tu nombre y fecha de nacimiento."
|
72 |
)
|
73 |
|
74 |
+
iface.launch()
|