openreviewer commited on
Commit
59f17be
β€’
1 Parent(s): 9e62f85

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +11 -42
app.py CHANGED
@@ -48,32 +48,7 @@ def review_papers(pdf_file):
48
  reviews = processed_reviews
49
  else:
50
  reviews = [
51
- {
52
- "Summary": "This is a placeholder review for Model 1. The paper explores advanced methodologies in reinforcement learning applied to autonomous driving systems, proposing significant enhancements to decision-making algorithms that could improve safety and operational efficiency. The authors provide a detailed analysis of the current limitations of existing systems and suggest innovative solutions that could transform the field.",
53
- "Soundness": "The assumptions underlying the proposed enhancements are occasionally not fully justified, particularly concerning the scalability of the algorithms under varied and unpredictable traffic conditions. A more rigorous examination of these assumptions is necessary to solidify the paper's foundation.",
54
- "Presentation": "While the paper is structured adequately, some sections delve into technical details that are not sufficiently elucidated for a broader audience. This could potentially limit the paper's impact and accessibility, making it challenging for non-specialists to fully grasp the implications of the research.",
55
- "Contribution": "The paper makes a moderate contribution to the existing body of knowledge, offering incremental improvements over current methodologies rather than a completely novel approach. However, these improvements are significant and could lead to better practical implementations in the field of autonomous driving.",
56
- "Strengths": "The initial results presented in the paper are promising, showing potential for the proposed methods. The inclusion of real-world data in the preliminary experiments adds a layer of credibility and relevance to the results, showcasing the practical applicability of the research.",
57
- "Weaknesses": "The paper lacks detailed exposition on the methodology, particularly in how the algorithms adapt to unexpected or novel scenarios. This is a critical area that requires further development and testing to ensure the robustness and reliability of the proposed solutions.",
58
- "Questions/Suggestions": "The statistical analysis section could be enhanced by incorporating more robust statistical techniques and a wider array of metrics. Additionally, conducting tests in a variety of driving environments could help in substantiating the claims made and strengthen the overall findings of the research.",
59
- "Ethics Review": "The research complies with all ethical standards, addressing potential ethical issues related to autonomous driving comprehensively. Issues such as privacy concerns, decision-making in critical situations, and the overall impact on societal norms are discussed and handled with the utmost care.",
60
- "Overall Score": "3/5",
61
- "Confidence": "Confidence in the findings is moderate. While the initial results are encouraging, the limited scope of testing and some unresolved questions regarding scalability and robustness temper the confidence in these results.",
62
- "Code of Conduct": "There are no violations of the code of conduct noted. The research upholds ethical standards and maintains transparency in methodologies and data usage, contributing to its integrity and the trustworthiness of the findings."
63
- },
64
- {
65
- "Summary": "This is a placeholder review for Model 2. The paper explores advanced methodologies in reinforcement learning applied to autonomous driving systems, proposing significant enhancements to decision-making algorithms that could improve safety and operational efficiency. The authors provide a detailed analysis of the current limitations of existing systems and suggest innovative solutions that could transform the field.",
66
- "Soundness": "The assumptions underlying the proposed enhancements are occasionally not fully justified, particularly concerning the scalability of the algorithms under varied and unpredictable traffic conditions. A more rigorous examination of these assumptions is necessary to solidify the paper's foundation.",
67
- "Presentation": "While the paper is structured adequately, some sections delve into technical details that are not sufficiently elucidated for a broader audience. This could potentially limit the paper's impact and accessibility, making it challenging for non-specialists to fully grasp the implications of the research.",
68
- "Contribution": "The paper makes a moderate contribution to the existing body of knowledge, offering incremental improvements over current methodologies rather than a completely novel approach. However, these improvements are significant and could lead to better practical implementations in the field of autonomous driving.",
69
- "Strengths": "The initial results presented in the paper are promising, showing potential for the proposed methods. The inclusion of real-world data in the preliminary experiments adds a layer of credibility and relevance to the results, showcasing the practical applicability of the research.",
70
- "Weaknesses": "The paper lacks detailed exposition on the methodology, particularly in how the algorithms adapt to unexpected or novel scenarios. This is a critical area that requires further development and testing to ensure the robustness and reliability of the proposed solutions.",
71
- "Questions/Suggestions": "The statistical analysis section could be enhanced by incorporating more robust statistical techniques and a wider array of metrics. Additionally, conducting tests in a variety of driving environments could help in substantiating the claims made and strengthen the overall findings of the research.",
72
- "Ethics Review": "The research complies with all ethical standards, addressing potential ethical issues related to autonomous driving comprehensively. Issues such as privacy concerns, decision-making in critical situations, and the overall impact on societal norms are discussed and handled with the utmost care.",
73
- "Overall Score": "3/5",
74
- "Confidence": "Confidence in the findings is moderate. While the initial results are encouraging, the limited scope of testing and some unresolved questions regarding scalability and robustness temper the confidence in these results.",
75
- "Code of Conduct": "There are no violations of the code of conduct noted. The research upholds ethical standards and maintains transparency in methodologies and data usage, contributing to its integrity and the trustworthiness of the findings."
76
- }
77
  ]
78
  selected_models = ['model1-placeholder', 'model2-placeholder']
79
 
@@ -91,7 +66,6 @@ def review_papers(pdf_file):
91
  logging.debug(f"Final formatted reviews: {review_texts}")
92
  return review_texts[0], review_texts[1], gr.update(visible=True), gr.update(visible=True), model_a, model_b, paper_content
93
 
94
-
95
  def handle_vote(vote, model_a, model_b, paper_content):
96
  user_id = get_user_ip() # Get the user IP address as user_id
97
  paper_id = generate_paper_id(paper_content) # Generate paper_id from paper content
@@ -159,12 +133,10 @@ def setup_interface():
159
  with gr.Tabs():
160
  with gr.TabItem("Reviewer Arena"):
161
  gr.Markdown("## Reviewer Arena")
162
- gr.Markdown(
163
- "Upload an academic paper to get reviews from two randomly selected LLMs.")
164
  with gr.Row():
165
  file_input = gr.File(label="Upload Academic Paper")
166
- submit_button = gr.Button(
167
- "Submit!", elem_id="submit-button")
168
  with gr.Row():
169
  with gr.Column():
170
  gr.HTML("<div class='model-label'>Model A</div>")
@@ -173,28 +145,25 @@ def setup_interface():
173
  gr.HTML("<div class='model-label'>Model B</div>")
174
  review2 = gr.Markdown()
175
 
176
- vote_options = ["πŸ‘ A is better",
177
- "πŸ‘ B is better", "πŸ‘” Tie", "πŸ‘Ž Both are bad"]
178
- vote = gr.Radio(label="Vote on the best model",
179
- choices=vote_options, value="Tie", visible=False)
180
  vote_button = gr.Button("Submit Vote", visible=False)
181
  vote_message = gr.HTML("", visible=False)
182
- another_paper_button = gr.Button(
183
- "Review another paper", visible=False)
184
 
185
  model_identity_message = gr.HTML("", visible=False)
186
 
187
  def handle_vote_interface(vote, model_identity_message_a, model_identity_message_b, paper_content):
188
  return handle_vote(vote, model_identity_message_a, model_identity_message_b, paper_content)
189
 
190
- vote_button.click(fn=handle_vote_interface, inputs=[vote, model_identity_message, model_identity_message, paper_content],
 
 
 
191
  outputs=[vote_message, vote, vote_button, another_paper_button])
192
 
193
- submit_button.click(fn=review_papers, inputs=[file_input],
194
- outputs=[review1, review2, vote, vote_button, model_identity_message, model_identity_message, paper_content])
195
 
196
- another_paper_button.click(
197
- fn=lambda: None, inputs=None, outputs=None, js="() => { location.reload(); }")
198
  with gr.TabItem("Leaderboard"):
199
  gr.Markdown("## Leaderboard")
200
  leaderboard_html = """
 
48
  reviews = processed_reviews
49
  else:
50
  reviews = [
51
+ # Placeholder reviews
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  ]
53
  selected_models = ['model1-placeholder', 'model2-placeholder']
54
 
 
66
  logging.debug(f"Final formatted reviews: {review_texts}")
67
  return review_texts[0], review_texts[1], gr.update(visible=True), gr.update(visible=True), model_a, model_b, paper_content
68
 
 
69
  def handle_vote(vote, model_a, model_b, paper_content):
70
  user_id = get_user_ip() # Get the user IP address as user_id
71
  paper_id = generate_paper_id(paper_content) # Generate paper_id from paper content
 
133
  with gr.Tabs():
134
  with gr.TabItem("Reviewer Arena"):
135
  gr.Markdown("## Reviewer Arena")
136
+ gr.Markdown("Upload an academic paper to get reviews from two randomly selected LLMs.")
 
137
  with gr.Row():
138
  file_input = gr.File(label="Upload Academic Paper")
139
+ submit_button = gr.Button("Submit!", elem_id="submit-button")
 
140
  with gr.Row():
141
  with gr.Column():
142
  gr.HTML("<div class='model-label'>Model A</div>")
 
145
  gr.HTML("<div class='model-label'>Model B</div>")
146
  review2 = gr.Markdown()
147
 
148
+ vote_options = ["πŸ‘ A is better", "πŸ‘ B is better", "πŸ‘” Tie", "πŸ‘Ž Both are bad"]
149
+ vote = gr.Radio(label="Vote on the best model", choices=vote_options, value="Tie", visible=False)
 
 
150
  vote_button = gr.Button("Submit Vote", visible=False)
151
  vote_message = gr.HTML("", visible=False)
152
+ another_paper_button = gr.Button("Review another paper", visible=False)
 
153
 
154
  model_identity_message = gr.HTML("", visible=False)
155
 
156
  def handle_vote_interface(vote, model_identity_message_a, model_identity_message_b, paper_content):
157
  return handle_vote(vote, model_identity_message_a, model_identity_message_b, paper_content)
158
 
159
+ submit_button.click(fn=review_papers, inputs=[file_input],
160
+ outputs=[review1, review2, vote, vote_button, model_identity_message, model_identity_message, "paper_content"])
161
+
162
+ vote_button.click(fn=handle_vote_interface, inputs=[vote, model_identity_message, model_identity_message, "paper_content"],
163
  outputs=[vote_message, vote, vote_button, another_paper_button])
164
 
165
+ another_paper_button.click(fn=lambda: None, inputs=None, outputs=None, js="() => { location.reload(); }")
 
166
 
 
 
167
  with gr.TabItem("Leaderboard"):
168
  gr.Markdown("## Leaderboard")
169
  leaderboard_html = """