hysts HF staff commited on
Commit
6923bc1
1 Parent(s): 992a3e9
Files changed (3) hide show
  1. .pre-commit-config.yaml +3 -2
  2. README.md +1 -1
  3. app.py +58 -63
.pre-commit-config.yaml CHANGED
@@ -20,14 +20,15 @@ repos:
20
  - id: docformatter
21
  args: ['--in-place']
22
  - repo: https://github.com/pycqa/isort
23
- rev: 5.10.1
24
  hooks:
25
  - id: isort
26
  - repo: https://github.com/pre-commit/mirrors-mypy
27
- rev: v0.812
28
  hooks:
29
  - id: mypy
30
  args: ['--ignore-missing-imports']
 
31
  - repo: https://github.com/google/yapf
32
  rev: v0.32.0
33
  hooks:
20
  - id: docformatter
21
  args: ['--in-place']
22
  - repo: https://github.com/pycqa/isort
23
+ rev: 5.12.0
24
  hooks:
25
  - id: isort
26
  - repo: https://github.com/pre-commit/mirrors-mypy
27
+ rev: v0.991
28
  hooks:
29
  - id: mypy
30
  args: ['--ignore-missing-imports']
31
+ additional_dependencies: ['types-requests']
32
  - repo: https://github.com/google/yapf
33
  rev: v0.32.0
34
  hooks:
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🏢
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 3.0.24
8
  app_file: app.py
9
  pinned: false
10
  ---
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 3.36.1
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -11,72 +11,67 @@ NOTES = '''
11
  - [NAACL 2022](https://2022.naacl.org/)
12
  - [NAACL'22 Reproducibility Track](https://naacl2022-reproducibility-track.github.io/results/)
13
  '''
14
- FOOTER = '<img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=naacl2022.papers" />'
15
 
 
16
 
17
- def main():
18
- paper_list = PaperList()
19
 
20
- with gr.Blocks(css='style.css') as demo:
21
- gr.Markdown(DESCRIPTION)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- search_box = gr.Textbox(
24
- label='Search Title',
25
- placeholder=
26
- 'You can search for titles with regular expressions. e.g. (?<!sur)face'
27
- )
28
- case_sensitive = gr.Checkbox(label='Case Sensitive')
29
- filter_names = gr.CheckboxGroup(choices=[
30
- 'arXiv',
31
- 'GitHub',
32
- 'HF Space',
33
- 'HF Model',
34
- 'HF Dataset',
35
- ],
36
- label='Filter')
37
- paper_category_names = [
38
- 'Long Paper',
39
- 'Short Paper',
40
- 'Special Theme Paper',
41
- 'Findings',
42
- 'Industry Track',
43
- ]
44
- paper_categories = gr.CheckboxGroup(choices=paper_category_names,
45
- value=paper_category_names,
46
- label='Paper Categories')
47
- search_button = gr.Button('Search')
48
-
49
- number_of_papers = gr.Textbox(label='Number of Papers Found')
50
- table = gr.HTML(show_label=False)
51
-
52
- gr.Markdown(NOTES)
53
- gr.Markdown(FOOTER)
54
-
55
- demo.load(paper_list.render,
56
- inputs=[
57
- search_box,
58
- case_sensitive,
59
- filter_names,
60
- paper_categories,
61
- ],
62
- outputs=[
63
- number_of_papers,
64
- table,
65
- ])
66
- search_button.click(paper_list.render,
67
- inputs=[
68
- search_box,
69
- case_sensitive,
70
- filter_names,
71
- paper_categories,
72
- ],
73
- outputs=[
74
- number_of_papers,
75
- table,
76
- ])
77
-
78
- demo.launch(enable_queue=True, share=False)
79
 
 
80
 
81
- if __name__ == '__main__':
82
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  - [NAACL 2022](https://2022.naacl.org/)
12
  - [NAACL'22 Reproducibility Track](https://naacl2022-reproducibility-track.github.io/results/)
13
  '''
 
14
 
15
+ paper_list = PaperList()
16
 
17
+ with gr.Blocks(css='style.css') as demo:
18
+ gr.Markdown(DESCRIPTION)
19
 
20
+ search_box = gr.Textbox(
21
+ label='Search Title',
22
+ placeholder=
23
+ 'You can search for titles with regular expressions. e.g. (?<!sur)face'
24
+ )
25
+ case_sensitive = gr.Checkbox(label='Case Sensitive')
26
+ filter_names = gr.CheckboxGroup(label='Filter',
27
+ choices=[
28
+ 'arXiv',
29
+ 'GitHub',
30
+ 'HF Space',
31
+ 'HF Model',
32
+ 'HF Dataset',
33
+ ])
34
+ paper_category_names = [
35
+ 'Long Paper',
36
+ 'Short Paper',
37
+ 'Special Theme Paper',
38
+ 'Findings',
39
+ 'Industry Track',
40
+ ]
41
+ paper_categories = gr.CheckboxGroup(label='Paper Categories',
42
+ choices=paper_category_names,
43
+ value=paper_category_names)
44
+ search_button = gr.Button('Search')
45
 
46
+ number_of_papers = gr.Textbox(label='Number of Papers Found')
47
+ table = gr.HTML(show_label=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ gr.Markdown(NOTES)
50
 
51
+ demo.load(
52
+ fn=paper_list.render,
53
+ inputs=[
54
+ search_box,
55
+ case_sensitive,
56
+ filter_names,
57
+ paper_categories,
58
+ ],
59
+ outputs=[
60
+ number_of_papers,
61
+ table,
62
+ ],
63
+ )
64
+ search_button.click(
65
+ fn=paper_list.render,
66
+ inputs=[
67
+ search_box,
68
+ case_sensitive,
69
+ filter_names,
70
+ paper_categories,
71
+ ],
72
+ outputs=[
73
+ number_of_papers,
74
+ table,
75
+ ],
76
+ )
77
+ demo.queue().launch()