Update app.py
Browse files420 unmodified lines421422423424425426427428429430431432433434435436437438439440441442443444420 unmodified linesreturn None, None, "Please upload at least one PDF file before generating audio."audio_file, transcript = generate_audio(*args)return audio_file, transcript, Nonewith gr.Blocks(title="PDF to Audio", css="""#main_container {margin-top: 60px;}#logo {position: absolute;top: 10px;right: 10px;width: 100px; /* Fixed width */height: auto; /* Maintain aspect ratio */max-height: 60px; /* Maximum height */object-fit: contain; /* Ensure the entire logo is visible */}""") as demo:with gr.Row():gr.Markdown("# Convert PDFs into an audio podcast, lecture, summary and others", elem_id="title")gr.Image("logo.png", elem_id="logo", width=100, height=60) # Specify dimensions here toogr.Markdown("First, upload one or more PDFs, select options, then push Generate Audio.\nYou can also select a variety of custom option and direct the way the result is generated.")submit_btn = gr.Button("Generate Audio", elem_id="submit_btn")420 unmodified lines421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466420 unmodified linesreturn None, None, "Please upload at least one PDF file before generating audio."audio_file, transcript = generate_audio(*args)return audio_file, transcript, Nonewith gr.Blocks(title="PDF to Audio", css="""#header {display: flex;align-items: center;justify-content: space-between;padding: 20px;background-color: #f0f0f0;border-bottom: 1px solid #ddd;}#title {font-size: 24px;margin: 0;}#logo_container {width: 200px;height: 200px;display: flex;justify-content: center;align-items: center;}#logo_image {max-width: 100%;max-height: 100%;object-fit: contain;}#main_container {margin-top: 20px;}""") as demo:with gr.Row(elem_id="header"):with gr.Column(scale=4):gr.Markdown("# Convert PDFs into an audio podcast, lecture, summary and others", elem_id="title")with gr.Column(scale=1):gr.HTML('''<div id="logo_container"><img src="logo.png" id="logo_image" alt="Logo"></div>''')gr.Markdown("First, upload one or more PDFs, select options, then push Generate Audio.\nYou can also select a variety of custom option and direct the way the result is generated.")submit_btn = gr.Button("Generate Audio", elem_id="submit_btn")
app.py+38-16