Spaces:
Sleeping
Sleeping
RamAnanth1
commited on
Commit
•
5601530
1
Parent(s):
9bb3432
Update app.py
Browse files
app.py
CHANGED
@@ -12,5 +12,45 @@ from bertopic import BERTopic
|
|
12 |
from sklearn.cluster import KMeans
|
13 |
import numpy as np
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
x = st.slider('Select a value')
|
16 |
st.write(x, 'squared is', x * x)
|
|
|
12 |
from sklearn.cluster import KMeans
|
13 |
import numpy as np
|
14 |
|
15 |
+
venue = 'ICLR.cc/2023/Conference'
|
16 |
+
venue_short = 'iclr2023'
|
17 |
+
|
18 |
+
def get_conference_notes(venue, blind_submission=False):
|
19 |
+
"""
|
20 |
+
Get all notes of a conference (data) from OpenReview API.
|
21 |
+
If results are not final, you should set blind_submission=True.
|
22 |
+
"""
|
23 |
+
|
24 |
+
blind_param = '-/Blind_Submission' if blind_submission else ''
|
25 |
+
offset = 0
|
26 |
+
notes = []
|
27 |
+
while True:
|
28 |
+
print('Offset:', offset, 'Data:', len(notes))
|
29 |
+
url = f'https://api.openreview.net/notes?invitation={venue}/{blind_param}&offset={offset}'
|
30 |
+
response = requests.get(url)
|
31 |
+
data = response.json()
|
32 |
+
if len(data['notes']) == 0:
|
33 |
+
break
|
34 |
+
offset += 1000
|
35 |
+
notes.extend(data['notes'])
|
36 |
+
return notes
|
37 |
+
|
38 |
+
raw_notes = get_conference_notes(venue, blind_submission=True)
|
39 |
+
st.write("Number of submissions at ICLR 2023:", len(raw_notes))
|
40 |
+
|
41 |
+
df_raw = pd.json_normalize(raw_notes)
|
42 |
+
# set index as first column
|
43 |
+
# df_raw.set_index(df_raw.columns[0], inplace=True)
|
44 |
+
accepted_venues = ['ICLR 2023 poster', 'ICLR 2023 notable top 5%', 'ICLR 2023 notable top 25%']
|
45 |
+
df = df_raw[df_raw["content.venue"].isin(accepted_venues)]
|
46 |
+
st.write("Number of submissions accepted at ICLR 2023:", len(df))
|
47 |
+
|
48 |
+
df_filtered = df[['id', 'content.title', 'content.keywords', 'content.abstract']]
|
49 |
+
df = df_filtered
|
50 |
+
|
51 |
+
list_of_abstracts = list(df["content.title"].values)
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
x = st.slider('Select a value')
|
56 |
st.write(x, 'squared is', x * x)
|