nharshavardhana commited on
Commit
1f4cc7c
·
1 Parent(s): 559db5d
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -350,6 +350,8 @@ with gr.Blocks() as demo:
350
  epub_input = gr.File(label="Upload EPUB", type="filepath")
351
  prompt_input = gr.Textbox(label="Prompt", placeholder="e.g., Generate word frequency heatmap.")
352
  analyze_button = gr.Button("Analyze")
 
 
353
  with gr.Column():
354
  output_image = gr.Image(label="Sentiment Arc or Heatmap", type="filepath")
355
 
@@ -358,5 +360,7 @@ with gr.Blocks() as demo:
358
  inputs=[epub_input, prompt_input],
359
  outputs=output_image
360
  )
 
 
361
 
362
  demo.launch(share=True)
 
350
  epub_input = gr.File(label="Upload EPUB", type="filepath")
351
  prompt_input = gr.Textbox(label="Prompt", placeholder="e.g., Generate word frequency heatmap.")
352
  analyze_button = gr.Button("Analyze")
353
+ clear_btn = gr.Button("🧹 Clear")
354
+
355
  with gr.Column():
356
  output_image = gr.Image(label="Sentiment Arc or Heatmap", type="filepath")
357
 
 
360
  inputs=[epub_input, prompt_input],
361
  outputs=output_image
362
  )
363
+ clear_btn.click(lambda: (None, "", None), outputs=[epub_input, prompt_input, output_image])
364
+
365
 
366
  demo.launch(share=True)