Spaces:
Runtime error
Runtime error
File size: 389 Bytes
36cc19d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import gradio as gr
from gradio_simpletextextractfrompdf import SimpleTextExtractFromPDF
def first_200_chars(text):
return text[:200]
demo = gr.Interface(
fn=first_200_chars,
inputs=SimpleTextExtractFromPDF(label="Upload a PDF file"),
outputs="text",
title="First 200 Characters",
description="Enter some text and see the first 200 characters.",
)
demo.launch() |