Spaces:
Running
Running
Update app.py
Browse filesGemini is full of it. But I followed its directions and made these edits to fix the table direction:
476 - RTL (was LTR)
489 - html_output = ['<div id="table-payload" class="white-canvas" dir="rtl" align="center" style="background-color: #ffffff; padding: 15px; border-radius: 8px; display: block; width: 100%; box-sizing: border-box; text-align: center; direction: rtl;">']
494 html_output.append(f'<table dir="rtl" align="center" style="{table_style}" cellpadding="0" cellspacing="0">')
467 unmodified lines46846947047147247347447547647747847911 unmodified lines491492493494495496497420 unmodified lines918919920467 unmodified linestotal_slots = 5total_table_width_in = 5.0# Table container locked to LTR flow with legacy centering for Docstable_style = (f"width: {total_table_width_in}in !important; min-width: {total_table_width_in}in !important; "f"max-width: {total_table_width_in}in !important; table-layout: fixed !important; ""border-collapse: collapse !important; border-spacing: 0 !important; ""direction: ltr; border: 1pt solid #b7b7b7 !important; background-color: #ffffff; ""line-height: 1.0 !important; height: auto; ""margin-top: 0 !important; margin-bottom: 0 !important; ""margin-left: auto !important; margin-right: auto !important;"11 unmodified linesfor idx, current_chunk in enumerate(table_chunks):# Open a new table for each chunk with align="center" and dir="ltr"html_output.append(f'<table dir="ltr" align="center" style="{table_style}" cellpadding="0" cellspacing="0">')html_output.append(' <colgroup>')for _ in range(total_slots):html_output.append(f' <col style="width: {column_width_in}in !important; min-width: {column_width_in}in !important; max-width: {column_width_in}in !important;">')420 unmodified linesdemo.queue().launch(server_name="0.0.0.0", server_port=7860, css=custom_css)467 unmodified lines46846947047147247347447547647747847911 unmodified lines491492493494495496497420 unmodified lines918919920921467 unmodified linestotal_slots = 5total_table_width_in = 5.0# Table container locked to LTR flow with legacy centering for Docs - NO, WAIT! Gemini said this is why they're backwards. So I changed to RTLtable_style = (f"width: {total_table_width_in}in !important; min-width: {total_table_width_in}in !important; "f"max-width: {total_table_width_in}in !important; table-layout: fixed !important; ""border-collapse: collapse !important; border-spacing: 0 !important; ""direction: rtl; border: 1pt solid #b7b7b7 !important; background-color: #ffffff; ""line-height: 1.0 !important; height: auto; ""margin-top: 0 !important; margin-bottom: 0 !important; ""margin-left: auto !important; margin-right: auto !important;"11 unmodified linesfor idx, current_chunk in enumerate(table_chunks):# Open a new table for each chunk with align="center" and dir="ltr"html_output.append(f'<table dir="rtl" align="center" style="{table_style}" cellpadding="0" cellspacing="0">')html_output.append(' <colgroup>')for _ in range(total_slots):html_output.append(f' <col style="width: {column_width_in}in !important; min-width: {column_width_in}in !important; max-width: {column_width_in}in !important;">')420 unmodified linesdemo.queue().launch(server_name="0.0.0.0", server_port=7860, css=custom_css)
app.py+4-3