maxidl commited on
Commit
828050f
·
1 Parent(s): b451083
Files changed (2) hide show
  1. app.py +11 -1
  2. examples/2105.04505v1.pdf +0 -0
app.py CHANGED
@@ -246,11 +246,21 @@ with gr.Blocks(theme=theme) as demo:
246
  file_input.upload(process_file, file_input, paper_text_field)
247
  paper_text_field.change(lambda text: gr.update(interactive=True) if len(text) > 200 else gr.update(interactive=False), paper_text_field, generate_button)
248
 
249
- review_field = gr.Markdown("# Review\n\n\n\n\n", label="Review")
250
  generate_button.click(fn=lambda: gr.update(interactive=False), inputs=None, outputs=generate_button).then(generate, [paper_text_field, review_template_field], review_field).then(fn=lambda: gr.update(interactive=True), inputs=None, outputs=generate_button)
 
 
 
 
 
 
 
 
 
251
  demo.title = "Paper Review Generator"
252
 
253
 
254
 
 
255
  if __name__ == "__main__":
256
  demo.launch()
 
246
  file_input.upload(process_file, file_input, paper_text_field)
247
  paper_text_field.change(lambda text: gr.update(interactive=True) if len(text) > 200 else gr.update(interactive=False), paper_text_field, generate_button)
248
 
249
+ review_field = gr.Markdown("\n\n\n\n\n", label="Review")
250
  generate_button.click(fn=lambda: gr.update(interactive=False), inputs=None, outputs=generate_button).then(generate, [paper_text_field, review_template_field], review_field).then(fn=lambda: gr.update(interactive=True), inputs=None, outputs=generate_button)
251
+
252
+ gr.Examples([
253
+ "examples/2105.04505v1.pdf", REVIEW_FIELDS
254
+ ],
255
+ inputs=[paper_text_field, review_template_field],
256
+ outputs=[review_field],
257
+ fn=generate,
258
+ cache_examples=True)
259
+
260
  demo.title = "Paper Review Generator"
261
 
262
 
263
 
264
+
265
  if __name__ == "__main__":
266
  demo.launch()
examples/2105.04505v1.pdf ADDED
Binary file (238 kB). View file