umarigan commited on
Commit
beac33f
1 Parent(s): 5bc5d99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -74,11 +74,11 @@ def generate_plot(query, pdf_file):
74
  logging.info("Plot created successfully.")
75
  # Save the plot to an HTML file
76
  temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".html")
 
77
  output_file(temp_file.name)
78
  save(p)
79
  logging.info("Plot saved to file.")
80
- output_file("plot.html")
81
- return p.figure
82
 
83
  def gradio_interface(pdf_file, query):
84
  logging.info("Gradio interface called.")
 
74
  logging.info("Plot created successfully.")
75
  # Save the plot to an HTML file
76
  temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".html")
77
+ logging.info(f"temp file is {temp_file.name}")
78
  output_file(temp_file.name)
79
  save(p)
80
  logging.info("Plot saved to file.")
81
+ return temp_file.name
 
82
 
83
  def gradio_interface(pdf_file, query):
84
  logging.info("Gradio interface called.")