Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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.")
|