Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from pdfminer.high_level import extract_text | |
| def process(file): | |
| print(file) | |
| text = extract_text(file.name) | |
| return text | |
| iface = gr.Interface( | |
| fn=process, | |
| inputs=gr.File(label="Upload PDF file", file_types=["pdf"]), | |
| outputs="text") | |
| iface.launch() |