Rubens commited on
Commit
cb80cd5
·
1 Parent(s): 24e3bc5
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -240,7 +240,9 @@ searcher = scann.scann_ops_pybind.builder(np.array(indice), 10, "dot_product").t
240
  import matplotlib.pyplot as plt
241
 
242
  def predict(text):
243
- campos=str(text).lower()
 
 
244
  query=np.sum([model.user_model(tf.constant(campos.split()[i])) for i in range(0,len(campos.split()))],axis=0)
245
  neighbors, distances = searcher.search_batched([query])
246
  xx = df.iloc[neighbors[0],:].nome_vaga
 
240
  import matplotlib.pyplot as plt
241
 
242
  def predict(text):
243
+ ##GI
244
+ campos=re.sub(r'[\W\s]', ' ', ''.join(unidecode.unidecode(str(text).lower()))).replace(" ", " ")
245
+ ##GI
246
  query=np.sum([model.user_model(tf.constant(campos.split()[i])) for i in range(0,len(campos.split()))],axis=0)
247
  neighbors, distances = searcher.search_batched([query])
248
  xx = df.iloc[neighbors[0],:].nome_vaga