Spaces:
Runtime error
Runtime error
Update
Browse files- .pre-commit-config.yaml +3 -2
- README.md +1 -1
- app.py +47 -52
.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.
|
| 24 |
hooks:
|
| 25 |
- id: isort
|
| 26 |
- repo: https://github.com/pre-commit/mirrors-mypy
|
| 27 |
-
rev: v0.
|
| 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: red
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 3.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
---
|
|
|
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 3.36.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
---
|
app.py
CHANGED
|
@@ -11,61 +11,56 @@ NOTES = '''
|
|
| 11 |
- [CVPR 2022](https://cvpr2022.thecvf.com/)
|
| 12 |
- [Proceedings](https://openaccess.thecvf.com/CVPR2022)
|
| 13 |
'''
|
| 14 |
-
FOOTER = '<img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=hysts.cvpr2022_papers" />'
|
| 15 |
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 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 |
-
'Supp',
|
| 31 |
-
'arXiv',
|
| 32 |
-
'GitHub',
|
| 33 |
-
'HF Space',
|
| 34 |
-
'HF Model',
|
| 35 |
-
'HF Dataset',
|
| 36 |
-
],
|
| 37 |
-
label='Filter')
|
| 38 |
-
search_button = gr.Button('Search')
|
| 39 |
-
|
| 40 |
-
number_of_papers = gr.Textbox(label='Number of Papers Found')
|
| 41 |
-
table = gr.HTML(show_label=False)
|
| 42 |
-
|
| 43 |
-
gr.Markdown(NOTES)
|
| 44 |
-
gr.Markdown(FOOTER)
|
| 45 |
-
|
| 46 |
-
demo.load(paper_list.render,
|
| 47 |
-
inputs=[
|
| 48 |
-
search_box,
|
| 49 |
-
case_sensitive,
|
| 50 |
-
filter_names,
|
| 51 |
-
],
|
| 52 |
-
outputs=[
|
| 53 |
-
number_of_papers,
|
| 54 |
-
table,
|
| 55 |
-
])
|
| 56 |
-
search_button.click(paper_list.render,
|
| 57 |
-
inputs=[
|
| 58 |
-
search_box,
|
| 59 |
-
case_sensitive,
|
| 60 |
-
filter_names,
|
| 61 |
-
],
|
| 62 |
-
outputs=[
|
| 63 |
-
number_of_papers,
|
| 64 |
-
table,
|
| 65 |
-
])
|
| 66 |
-
|
| 67 |
-
demo.launch(enable_queue=True, share=False)
|
| 68 |
|
|
|
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- [CVPR 2022](https://cvpr2022.thecvf.com/)
|
| 12 |
- [Proceedings](https://openaccess.thecvf.com/CVPR2022)
|
| 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 |
+
'Supp',
|
| 29 |
+
'arXiv',
|
| 30 |
+
'GitHub',
|
| 31 |
+
'HF Space',
|
| 32 |
+
'HF Model',
|
| 33 |
+
'HF Dataset',
|
| 34 |
+
])
|
| 35 |
+
search_button = gr.Button('Search')
|
| 36 |
|
| 37 |
+
number_of_papers = gr.Textbox(label='Number of Papers Found')
|
| 38 |
+
table = gr.HTML(show_label=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
gr.Markdown(NOTES)
|
| 41 |
|
| 42 |
+
demo.load(
|
| 43 |
+
fn=paper_list.render,
|
| 44 |
+
inputs=[
|
| 45 |
+
search_box,
|
| 46 |
+
case_sensitive,
|
| 47 |
+
filter_names,
|
| 48 |
+
],
|
| 49 |
+
outputs=[
|
| 50 |
+
number_of_papers,
|
| 51 |
+
table,
|
| 52 |
+
],
|
| 53 |
+
)
|
| 54 |
+
search_button.click(
|
| 55 |
+
fn=paper_list.render,
|
| 56 |
+
inputs=[
|
| 57 |
+
search_box,
|
| 58 |
+
case_sensitive,
|
| 59 |
+
filter_names,
|
| 60 |
+
],
|
| 61 |
+
outputs=[
|
| 62 |
+
number_of_papers,
|
| 63 |
+
table,
|
| 64 |
+
],
|
| 65 |
+
)
|
| 66 |
+
demo.queue().launch()
|