jskim commited on
Commit
48d609e
·
1 Parent(s): 3448819

making title/affinity format consistent with markdown

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -27,7 +27,7 @@ def get_similar_paper(
27
  abstract_text_input,
28
  author_id_input,
29
  results={}, # this state variable will be updated and returned
30
- # progress=gr.Progress(track_tqdm=True)
31
  ):
32
  num_papers_show = 10 # number of top papers to show from the reviewer
33
  print('retrieving similar papers...')
@@ -177,7 +177,8 @@ def change_paper(selected_papers_radio, info={}):
177
  highlights = info[selected_papers_radio]['highlight']
178
  url = info[selected_papers_radio]['url']
179
  title_out = '#### [%s](%s)'%(title, url) # output in format of markdown
180
- return title_out, abstract, aff_score, highlights['0']
 
181
 
182
  else:
183
  return
@@ -343,7 +344,8 @@ Below we describe how to use the tool. Also feel free to check out the [video]()
343
  with gr.Column(scale=3):
344
  paper_title = gr.Markdown(value='')
345
  with gr.Column(scale=1):
346
- affinity= gr.Textbox(label='Affinity', interactive=False, value='')
 
347
  with gr.Row():
348
  paper_abstract = gr.Textbox(label='Abstract', interactive=False, visible=False)
349
 
 
27
  abstract_text_input,
28
  author_id_input,
29
  results={}, # this state variable will be updated and returned
30
+ #progress=gr.Progress()
31
  ):
32
  num_papers_show = 10 # number of top papers to show from the reviewer
33
  print('retrieving similar papers...')
 
177
  highlights = info[selected_papers_radio]['highlight']
178
  url = info[selected_papers_radio]['url']
179
  title_out = '#### [%s](%s)'%(title, url) # output in format of markdown
180
+ aff_score_out = '#### Affinity: %s'%aff_score
181
+ return title_out, abstract, aff_score_out, highlights['0']
182
 
183
  else:
184
  return
 
344
  with gr.Column(scale=3):
345
  paper_title = gr.Markdown(value='')
346
  with gr.Column(scale=1):
347
+ # affinity= gr.Textbox(label='Affinity', interactive=False, value='')
348
+ affinity = gr.Markdown(value='')
349
  with gr.Row():
350
  paper_abstract = gr.Textbox(label='Abstract', interactive=False, visible=False)
351