testing / app.py
Mishmosh's picture
Update app.py
f5184a9
raw
history blame
569 Bytes
import gradio as gr
def upload_file(files):
# Assuming the user will upload only one PDF file, extract its name
pdf_file_path = [file.name for file in files if file.name.endswith(".pdf")]
return pdf_file_path
with gr.Blocks() as demo:
file_output = gr.File()
upload_button = gr.UploadButton("Please upload a PDF that contains an abstract. I will provide a one-sentence summary of the abstract and will say the summary out loud.", file_types=[".pdf"], file_count=1)
upload_button.upload(upload_file, upload_button, file_output)
demo.launch()