Spaces:
Running
Running
Update app.py
Browse files8 unmodified lines910111212131415161617181920212122232492 unmodified lines117118119120120121122123193 unmodified lines3173183193203203213223238 unmodified linesfrom docx.oxml import parse_xml, OxmlElementfrom docx.oxml.ns import nsdecls, qn
# Classic reliable legacy library version that matches your environment perfectly# Standard classic library that natively maps your stable model choice seamlesslyimport google.generativeai as generative_ai
# ---------------------------------------------------------------------------# 1. LIVE LINGUISTIC PIPELINE (RESTORED CLEAN SDK CALL)# 1. CORE API LINGUISTIC PIPELINE (STABLE LEGACY WORKSPACE ROUTING)# ---------------------------------------------------------------------------def process_live_ai_request(word, api_key): """ Queries the stable Gemini 1.5 Flash model directly using the classic generativeai SDK configuration setup that successfully generated your tables. generativeai SDK configuration setup to completely bypass 404 mismatches. """ clean_key = api_key.strip() if api_key else "" if not clean_key:92 unmodified lines cell_top.width = Inches(col_widths[col_idx]) tcPr_top = cell_top._tc.get_or_add_tcPr() borders_top = parse_xml(f'<w:tcBorders {nsdecls("w")}><w:top w:val="single" w:sz="4" w:color="B7B7B7"/><w:left w:val="single" w:sz="4" w:color="B7B7B7"/><w:bottom w:val="single" w:sz="4" w:color="B7B7B7"/><w:right w:val="single" w:sz="4" w:color="B7B7B7"/></w:tcBorders>') # Word cell margins locked down precisely to your 0.069 inches padding benchmark # Cell margin cell padding locked tightly to your clean 0.069 inches benchmark config padding_top = parse_xml(f'<w:tcMar {nsdecls("w")}><w:top w:w="99" w:type="dxa"/><w:left w:w="99" w:type="dxa"/><w:bottom w:w="99" w:type="dxa"/><w:right w:w="99" w:type="dxa"/></w:tcMar>') tcPr_top.append(borders_top) tcPr_top.append(padding_top)193 unmodified lines with gr.Row(): with gr.Column(scale=2): # FIX: Locked font contrast parameters inline directly onto the paragraph block text nodes # FIX: Injected inline styling color attributes directly into the HTML tag properties to enforce clear gray gr.HTML(''' <div class="api-guide-box"> <p style="color: #2D3748 !important; font-family: Arial, sans-serif !important; font-size: 11pt !important; margin: 0 !important; padding: 0 !important; line-height: 1.4 !important;">app.py+5-5