phxdev commited on
Commit
142e77c
·
verified ·
1 Parent(s): 4930fad

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -356,11 +356,7 @@ def create_interface():
356
  height=200
357
  )
358
 
359
- with gr.Row():
360
- pdf_download = gr.File(
361
- label="Download PDF",
362
- visible=False
363
- )
364
 
365
  with gr.Row():
366
  gr.Markdown("""
@@ -378,18 +374,16 @@ def create_interface():
378
  topic, audience, keypoints, tone, length, model, include_image
379
  )
380
 
381
- # Return outputs for all components
382
- pdf_visible = pdf_path is not None
383
  return (
384
  content, # output_text
385
- header_image, # generated_image
386
- gr.File(value=pdf_path, visible=pdf_visible) # pdf_download
387
  )
388
 
389
  generate_btn.click(
390
  fn=generate_and_display,
391
  inputs=[topic_input, audience_input, keypoints_input, tone_dropdown, length_dropdown, model_dropdown, include_image_checkbox],
392
- outputs=[output_text, generated_image, pdf_download]
393
  )
394
 
395
  return demo
@@ -411,4 +405,4 @@ if __name__ == "__main__":
411
 
412
  print("🌐 Launching interface...")
413
  demo = create_interface()
414
- demo.launch()
 
356
  height=200
357
  )
358
 
359
+ # PDF download temporarily disabled to avoid schema issues
 
 
 
 
360
 
361
  with gr.Row():
362
  gr.Markdown("""
 
374
  topic, audience, keypoints, tone, length, model, include_image
375
  )
376
 
377
+ # Return only text and image for now (simplified)
 
378
  return (
379
  content, # output_text
380
+ header_image # generated_image
 
381
  )
382
 
383
  generate_btn.click(
384
  fn=generate_and_display,
385
  inputs=[topic_input, audience_input, keypoints_input, tone_dropdown, length_dropdown, model_dropdown, include_image_checkbox],
386
+ outputs=[output_text, generated_image]
387
  )
388
 
389
  return demo
 
405
 
406
  print("🌐 Launching interface...")
407
  demo = create_interface()
408
+ demo.launch(share=True, server_name="0.0.0.0")