testing / app.py
Mishmosh's picture
Update app.py
fdfa3e5
raw
history blame contribute delete
514 Bytes
import gradio as gr
def process_input(pdf_file):
print("Received PDF File:", pdf_file.name)
with open("received_pdf.pdf", "wb") as output_file:
output_file.write(pdf_file.read())
return None
iface = gr.Interface(
fn=process_input,
inputs=[
gr.File(
type="binary",
label="Please upload a PDF file that contains an abstract. You will receive a one-sentence summary of the PDF and can listen to it.",
),
],
outputs=None,
)
iface.launch()