nityathakkar commited on
Commit
732755b
·
verified ·
1 Parent(s): 736f17d

added review filtering to fields of interest

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -65,6 +65,7 @@ def load_ICLR_submissions():
65
  # returns review and pdf paper text given paper id and reviewer id
66
  def parse_openreview_id(submissions, paper_id, reviewer_id):
67
  paper_url = f"https://openreview.net/pdf?id={paper_id}"
 
68
 
69
  ind = next((index for index, entry in enumerate(submissions) if entry.id == paper_id), None)
70
  curr_review = submissions[ind]
@@ -76,6 +77,8 @@ def parse_openreview_id(submissions, paper_id, reviewer_id):
76
  except:
77
  st.error("Paper ID or reviewer ID are incorrect")
78
 
 
 
79
  urllib.request.urlretrieve(paper_url, f"{paper_id}.pdf")
80
  pdf = f"{paper_id}.pdf"
81
  pdf_text = pdf_to_text(pdf)
 
65
  # returns review and pdf paper text given paper id and reviewer id
66
  def parse_openreview_id(submissions, paper_id, reviewer_id):
67
  paper_url = f"https://openreview.net/pdf?id={paper_id}"
68
+ fields = ['summary', 'soundness', 'presentation', 'contribution', 'strengths', 'weaknesses', 'questions']
69
 
70
  ind = next((index for index, entry in enumerate(submissions) if entry.id == paper_id), None)
71
  curr_review = submissions[ind]
 
77
  except:
78
  st.error("Paper ID or reviewer ID are incorrect")
79
 
80
+ review_content = {key: review_content[key] if key in fields else None for key in review_content.keys() if key in fields}
81
+
82
  urllib.request.urlretrieve(paper_url, f"{paper_id}.pdf")
83
  pdf = f"{paper_id}.pdf"
84
  pdf_text = pdf_to_text(pdf)