Spaces:
Runtime error
Runtime error
Commit ·
e64fb41
1
Parent(s): 33174dd
fix: update paper title section and links in interface
Browse files23 unmodified lines2425262728293057 unmodified lines8889909192939413 unmodified lines10810911011111211311411511646 unmodified lines16316416516616716816923 unmodified linesinfo = []# Title sectioninfo.append(f"<h2 class='sf-paper-title'>{article.title or 'Untitled Paper'}</h2>")info.append(f"<p style='text-align: center'>")info.append(f"<a href='https://huggingface.co/papers/{article.paper.id}' target='_blank' class='sf-button'>Hugging Face{assets.SVG_LINK}</a>")info.append(f"<a href='https://arxiv.org/abs/{article.paper.id}' target='_blank' class='sf-button'>arXiv{assets.SVG_LINK}</a>")57 unmodified linespaper_id = article.paper.id# 构造 arXiv abs 链接arxiv_abs_link = f"https://arxiv.org/abs/{paper_id}"row = f"""<tr>13 unmodified linesdef build_html(papers):# Convert all papers to an HTML string, each paper wrapped in a div, with the div containing the paper's information, and the div's id being the paper's idhtml = ""for article in papers:article_html = format_paper_info(article)html += f"<div id='smartflow-paper-{article.paper.id.replace('.', '-')}' style='display: none'>{article_html}</div>"return html46 unmodified linesmargin: 0 0.1rem;}#paper-detail-area { display: none; }#query-results-html { min-height: 100px; }"""23 unmodified lines2425262728293057 unmodified lines8889909192939413 unmodified lines10810911011111211311411511646 unmodified lines16316416516616716816917017117217317417517623 unmodified linesinfo = []# Title sectioninfo.append(f"<h2 class='sf-paper-title' id='sf-flag'>{article.title or 'Untitled Paper'}</h2>")info.append(f"<p style='text-align: center'>")info.append(f"<a href='https://huggingface.co/papers/{article.paper.id}' target='_blank' class='sf-button'>Hugging Face{assets.SVG_LINK}</a>")info.append(f"<a href='https://arxiv.org/abs/{article.paper.id}' target='_blank' class='sf-button'>arXiv{assets.SVG_LINK}</a>")57 unmodified linespaper_id = article.paper.id# 构造 arXiv abs 链接arxiv_abs_link = f"https://huggingface.co/papers/{paper_id}"row = f"""<tr>13 unmodified linesdef build_html(papers):# Convert all papers to an HTML string, each paper wrapped in a div, with the div containing the paper's information, and the div's id being the paper's idhtml = ""for index, article in enumerate(papers):article_html = format_paper_info(article)html += f"<div id='smartflow-paper-{article.paper.id.replace('.', '-')}' style='{'' if index == 0 else 'display: none'}'>{article_html}</div>"return html46 unmodified linesmargin: 0 0.1rem;}#paper-detail-area {display: none;}#paper-detail-area:has(#sf-flag) {display: block;}#query-results-html { min-height: 100px; }"""
interface.py+12-5