atrytone commited on
Commit
e683776
·
1 Parent(s): 9e2a674

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -95,7 +95,7 @@ def inference(query):
95
  return [a_output, j_output, n_output]
96
 
97
 
98
- model_name = "biodatlab/MIReAD-Neuro-Large"
99
  model_kwargs = {'device': 'cpu'}
100
  encode_kwargs = {'normalize_embeddings': False}
101
  faiss_embedder = HuggingFaceEmbeddings(
@@ -104,7 +104,7 @@ faiss_embedder = HuggingFaceEmbeddings(
104
  encode_kwargs=encode_kwargs
105
  )
106
 
107
- vecdb = FAISS.load_local("nbdt_index", faiss_embedder)
108
 
109
 
110
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
@@ -113,7 +113,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
113
  It aims to help an editor to find similar reviewers, abstracts, and journals to a given submitted abstract.\
114
  To find a recommendation, paste a `title[SEP]abstract` or `abstract` in the text box below and click \"Find Matches\".\
115
  Then, you can hover to authors/abstracts/journals tab to find a suggested list.\
116
- The data in our current demo includes authors associated with the NBDT Journal. We will update the data monthly for an up-to-date publications.")
 
117
 
118
  abst = gr.Textbox(label="Abstract", lines=10)
119
 
 
95
  return [a_output, j_output, n_output]
96
 
97
 
98
+ model_name = "biodatlab/MIReAD-Neuro-Contrastive"
99
  model_kwargs = {'device': 'cpu'}
100
  encode_kwargs = {'normalize_embeddings': False}
101
  faiss_embedder = HuggingFaceEmbeddings(
 
104
  encode_kwargs=encode_kwargs
105
  )
106
 
107
+ vecdb = FAISS.load_local("nbdt_contr", faiss_embedder)
108
 
109
 
110
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
 
113
  It aims to help an editor to find similar reviewers, abstracts, and journals to a given submitted abstract.\
114
  To find a recommendation, paste a `title[SEP]abstract` or `abstract` in the text box below and click \"Find Matches\".\
115
  Then, you can hover to authors/abstracts/journals tab to find a suggested list.\
116
+ The data in our current demo includes authors associated with the NBDT Journal. We will update the data monthly for an up-to-date publications. \
117
+ Model on Deployment: " + model_name)
118
 
119
  abst = gr.Textbox(label="Abstract", lines=10)
120