freemt commited on
Commit
e2c8e7c
·
1 Parent(s): efbffad
Files changed (1) hide show
  1. ubee/__main__.py +8 -7
ubee/__main__.py CHANGED
@@ -78,9 +78,9 @@ except Exception as _:
78
 
79
  # segment: str
80
  def ifn(
81
- # text1,
82
- # text2,
83
- # thresh: float
84
  ) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
85
  """Take inputs, return outputs.
86
 
@@ -90,7 +90,7 @@ def ifn(
90
  Returns:
91
  pd.DataFrame
92
  """
93
- global text1, text2, thresh
94
 
95
  res1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
96
  res2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
@@ -267,7 +267,7 @@ def main():
267
  label="text2"
268
  )
269
  with gr.Row():
270
- slider = gr.inputs.Slider(
271
  minimum=0.0,
272
  maximum=1.0,
273
  step=0.1,
@@ -307,8 +307,9 @@ def main():
307
  btn.click(
308
  ifn,
309
  inputs=[
310
- # text1,
311
- # text2,
 
312
  ],
313
  outputs=[
314
  out_df,
 
78
 
79
  # segment: str
80
  def ifn(
81
+ text1,
82
+ text2,
83
+ thresh: float
84
  ) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
85
  """Take inputs, return outputs.
86
 
 
90
  Returns:
91
  pd.DataFrame
92
  """
93
+ # global text1, text2, thresh
94
 
95
  res1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
96
  res2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
 
267
  label="text2"
268
  )
269
  with gr.Row():
270
+ thresh = gr.inputs.Slider(
271
  minimum=0.0,
272
  maximum=1.0,
273
  step=0.1,
 
307
  btn.click(
308
  ifn,
309
  inputs=[
310
+ text1,
311
+ text2,
312
+ thresh,
313
  ],
314
  outputs=[
315
  out_df,