freemt commited on
Commit
0c6d923
1 Parent(s): 14c9c8a

Update value for text1, text1 and thresh

Browse files
Files changed (1) hide show
  1. ubee/__main__.py +8 -8
ubee/__main__.py CHANGED
@@ -75,16 +75,16 @@ except Exception as _:
75
  # 'scores': [0.8885253667831421, 0.10581762343645096, 0.005657028406858444]}
76
  # Runs OK
77
 
78
- text1 = ""
79
- text2 = ""
80
- thresh: float = 0.4
81
 
82
 
83
  # segment: str
84
  def ifn(
85
- # text1,
86
- # text2,
87
- # thresh: float
88
  ) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
89
  """Take inputs, return outputs.
90
 
@@ -109,7 +109,7 @@ def ifn(
109
  # _ = pd.DataFrame(zip_longest(res1, res2), columns=["text1", "text2"])
110
  # return _
111
 
112
- res1_, res2_ = ubee(res1, res2, thresh)
113
 
114
  out_df = pd.DataFrame(
115
  zip_longest(res1, res2),
@@ -126,7 +126,7 @@ def ifn(
126
 
127
  def main():
128
  """Create main entry."""
129
- global text1, text2, threash
130
 
131
  text_zh = Path("data/test_zh.txt").read_text(encoding="utf8")
132
  text_zh = [elm.strip() for elm in text_zh.splitlines() if elm.strip()][:10]
 
75
  # 'scores': [0.8885253667831421, 0.10581762343645096, 0.005657028406858444]}
76
  # Runs OK
77
 
78
+ # text1 = ""
79
+ # text2 = ""
80
+ # thresh: float = 0.4
81
 
82
 
83
  # segment: str
84
  def ifn(
85
+ text1,
86
+ text2,
87
+ thresh
88
  ) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
89
  """Take inputs, return outputs.
90
 
 
109
  # _ = pd.DataFrame(zip_longest(res1, res2), columns=["text1", "text2"])
110
  # return _
111
 
112
+ res1_, res2_ = ubee(res1, res2, thresh.value)
113
 
114
  out_df = pd.DataFrame(
115
  zip_longest(res1, res2),
 
126
 
127
  def main():
128
  """Create main entry."""
129
+ # global text1, text2, threash
130
 
131
  text_zh = Path("data/test_zh.txt").read_text(encoding="utf8")
132
  text_zh = [elm.strip() for elm in text_zh.splitlines() if elm.strip()][:10]