tomaseo2022 commited on
Commit
d4d6cb9
1 Parent(s): 15dfed1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -23,10 +23,8 @@ def pdf_to_xml(pdf_file):
23
  except Exception as e:
24
  return f"Error al procesar el archivo: {str(e)}"
25
 
26
- iface = gr.Interface(
27
- fn=pdf_to_xml,
28
- inputs=gr.inputs.File(label="Selecciona un archivo PDF", type="file"),
29
- outputs=gr.outputs.Textbox(label="Archivo XML convertido")
30
- )
31
 
32
  iface.launch(share=True)
 
23
  except Exception as e:
24
  return f"Error al procesar el archivo: {str(e)}"
25
 
26
+ file_input = gr.inputs.File(label="Selecciona un archivo PDF", type="file")
27
+ textbox_output = gr.outputs.Textbox(label="Archivo XML convertido")
28
+ iface = gr.Interface(fn=pdf_to_xml, inputs=file_input, outputs=textbox_output)
 
 
29
 
30
  iface.launch(share=True)