jcmachicao
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -54,12 +54,23 @@ def generacion_llm(texto_input):
|
|
54 |
return f"Error: {e}"
|
55 |
|
56 |
# Define Gradio app
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
gr.Markdown(
|
64 |
"""
|
65 |
<br>
|
@@ -68,6 +79,6 @@ interface = gr.Interface(
|
|
68 |
</div>
|
69 |
"""
|
70 |
)
|
71 |
-
)
|
72 |
|
73 |
-
interface
|
|
|
|
54 |
return f"Error: {e}"
|
55 |
|
56 |
# Define Gradio app
|
57 |
+
with gr.Blocks() as interface:
|
58 |
+
# Title and description
|
59 |
+
gr.Markdown(
|
60 |
+
"""
|
61 |
+
# Estructurador de Autodiagn贸stico
|
62 |
+
Ingrese el texto para analizar y extraer informaci贸n en un formato JSON predefinido.
|
63 |
+
"""
|
64 |
+
)
|
65 |
+
# Input and output components
|
66 |
+
input_text = gr.Textbox(label="Ingrese su texto libre para estructurar.")
|
67 |
+
output_json = gr.Textbox(label="Resultado JSON")
|
68 |
+
submit_button = gr.Button("Procesar")
|
69 |
+
|
70 |
+
# Link the input/output and function
|
71 |
+
submit_button.click(fn=generacion_llm, inputs=input_text, outputs=output_json)
|
72 |
+
|
73 |
+
# Add the logo at the end
|
74 |
gr.Markdown(
|
75 |
"""
|
76 |
<br>
|
|
|
79 |
</div>
|
80 |
"""
|
81 |
)
|
|
|
82 |
|
83 |
+
# Launch the interface
|
84 |
+
interface.launch(share=True)
|