kpriyanshu256 commited on
Commit
36ac3bd
·
1 Parent(s): 18eff01

Typo fixed

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -135,7 +135,7 @@ def disambiguate(text, acronym):
135
  mask = torch.tensor(inputs['mask'])
136
  token_type = torch.tensor(inputs['token_type'])
137
  offsets = inputs['offset']
138
- expansion = inputs['expnsion']
139
  acronym = inputs['acronym']
140
 
141
  ids = torch.unsqueeze(ids, 0)
@@ -151,7 +151,7 @@ def disambiguate(text, acronym):
151
  start_idx = np.argmax(start_prob[0,:])
152
  end_idx = np.argmax(end_prob[0,:])
153
 
154
- js, exp = evaluate_jaccard(text, expansion[0], acronym[0], offsets[0], start_idx, end_idx)
155
  return exp
156
 
157
  text = gr.inputs.Textbox(lines=5, label="Context",\
 
135
  mask = torch.tensor(inputs['mask'])
136
  token_type = torch.tensor(inputs['token_type'])
137
  offsets = inputs['offset']
138
+ expansion = inputs['expansion']
139
  acronym = inputs['acronym']
140
 
141
  ids = torch.unsqueeze(ids, 0)
 
151
  start_idx = np.argmax(start_prob[0,:])
152
  end_idx = np.argmax(end_prob[0,:])
153
 
154
+ _, exp = evaluate_jaccard(text, expansion[0], acronym[0], offsets[0], start_idx, end_idx)
155
  return exp
156
 
157
  text = gr.inputs.Textbox(lines=5, label="Context",\