papers / app.py
hysts's picture
hysts HF staff
Use csv (#2)
83cc9a7
raw
history blame
732 Bytes
import gradio as gr
import pandas as pd
def update():
return pd.read_csv('papers.csv', header=0)
block = gr.Blocks()
with block:
gr.Markdown(
"""# Papers List for NAACL 2022 as part of the NAACL event, To learn more and join, see <a href="https://huggingface.co/NAACL2022" target="_blank" style="text-decoration: underline">NAACL event</a>"""
)
with gr.Tabs():
with gr.TabItem("NAACL papers list"):
with gr.Row():
data = gr.Dataframe(type="pandas", wrap=True)
with gr.Row():
data_run = gr.Button("Refresh")
data_run.click(update, inputs=None, outputs=data)
block.load(update, inputs=None, outputs=data)
block.launch()