hjianganthony commited on
Commit
0fc9bde
·
1 Parent(s): 0b7768d
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -3,7 +3,7 @@ import pandas as pd
3
  import numpy as np
4
 
5
  import pickle, json
6
- # from src.utils import *
7
 
8
  ##### Start #####
9
 
@@ -34,14 +34,10 @@ examples = [
34
 
35
  def main(sentence: str, score_type: str, threshold_cosine: float, threshold_jaccard: float = 0.1):
36
  threshold = threshold_cosine if score_type == "cosine" else threshold_jaccard
37
- # results = search_offers(sentence, df_offers_brand_retailer, category_dict, brand_belong_category_dict, score_type, threshold)
38
- results = None
39
  message, processed_results = process_output(results)
40
  return message, processed_results
41
 
42
- # def main(anything1, anything2, anything3, anything4):
43
- # return "Just a test", None
44
-
45
  def process_output(output):
46
  """Function to process the output"""
47
  if output is None or output.empty:
 
3
  import numpy as np
4
 
5
  import pickle, json
6
+ from src.utils import *
7
 
8
  ##### Start #####
9
 
 
34
 
35
  def main(sentence: str, score_type: str, threshold_cosine: float, threshold_jaccard: float = 0.1):
36
  threshold = threshold_cosine if score_type == "cosine" else threshold_jaccard
37
+ results = search_offers(sentence, df_offers_brand_retailer, category_dict, brand_belong_category_dict, score_type, threshold)
 
38
  message, processed_results = process_output(results)
39
  return message, processed_results
40
 
 
 
 
41
  def process_output(output):
42
  """Function to process the output"""
43
  if output is None or output.empty: