File size: 2,656 Bytes
9de9040
 
 
 
 
a302361
 
9de9040
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a302361
9de9040
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a302361
9de9040
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import gradio as gr
import pandas as pd

df = pd.read_csv("nlp_conferences.csv")

column_widths = ["18%", "20%", "17%", "15%", "30%"]


def update_table(search_query):
    if search_query == "":
        return df
    else:
        # Filter the dataframe based on the search query
        filtered_df = df[
            df.apply(
                lambda row: row.astype(str)
                .str.contains(search_query, case=False)
                .any(),
                axis=1,
            )
        ]
        return filtered_df


with gr.Blocks() as app:
    with gr.Tabs():
        with gr.TabItem("Español"):
            gr.Markdown(
                """
                # 🚀 Conferencias de PLN
                        
                Descubre las próximas conferencias de PLN. Las fechas límites son para la Main Conference.

                Ayúdanos a expandir esta lista. [Comenta](https://huggingface.co/spaces/somosnlp/nlp-conferences/discussions) y contribuye para hacerla lo más completa posible. ¡Gracias!
                """
            )

            with gr.Row():
                search_box = gr.Textbox(
                    placeholder="Buscar...",
                    label="Filtra la tabla",
                    show_label=False,
                )
            with gr.Row():
                table = gr.Dataframe(
                    value=df,
                    label="Conferencias de PLN",
                    show_label=False,
                    interactive=False,
                    wrap=True,
                    column_widths=column_widths,
                )
            search_box.change(fn=update_table, inputs=search_box, outputs=table)

        with gr.TabItem("English"):
            gr.Markdown(
                """
                # 🚀 NLP Conferences

                Discover the upcoming NLP conferences.
                
                Help us expand this list! [Comment](https://huggingface.co/spaces/somosnlp/nlp-conferences/discussions) and contribute to make it comprehensive. Thank you!
                """
            )

            with gr.Row():
                search_box = gr.Textbox(
                    placeholder="Type to search...", label="Search", show_label=False
                )
            with gr.Row():
                table = gr.Dataframe(
                    value=df,
                    label="NLP Conferences",
                    show_label=False,
                    interactive=False,
                    wrap=True,
                    column_widths=column_widths,
                )
            search_box.change(fn=update_table, inputs=search_box, outputs=table)

app.launch()