Spaces:
Running
Running
Update manabCQgenetaion.py
Browse files6 unmodified lines789101112130 unmodified lines1431441451461471486 unmodified linesimport reimport pandas as pddef normalize_text(s: str) -> str:"""Normalize whitespace / newlines in page_content."""s = s.replace("\r\n", "\n").replace("\r", "\n")130 unmodified linesclasses='table table-striped table-bordered table-hover',table_id='extraction-table')compliance_html = compliance_df.to_html(index=False,escape=False,6 unmodified lines7891011121314151617130 unmodified lines1481491501511521531541551561571581591601611621631641651661671681691706 unmodified linesimport reimport pandas as pdimport iofrom flask import send_filedef normalize_text(s: str) -> str:"""Normalize whitespace / newlines in page_content."""s = s.replace("\r\n", "\n").replace("\r", "\n")130 unmodified linesclasses='table table-striped table-bordered table-hover',table_id='extraction-table')@app.route("/download-extraction")def download_extraction():output = io.BytesIO()with pd.ExcelWriter(output, engine="xlsxwriter") as writer:extraction_df.to_excel(writer, index=False, sheet_name="Extraction")output.seek(0)return send_file(output,as_attachment=True,download_name="extraction.xlsx", # Flask >= 2.0mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",)extraction_html+=f"""<a href="/download-extraction" class="btn btn-primary" download>Download as Excel</a>"""compliance_html = compliance_df.to_html(index=False,escape=False,
manabCQgenetaion.py+22