freemt commited on
Commit
457ba36
·
1 Parent(s): 60d8e03
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,5 +1,6 @@
1
  """Bootstrap."""
2
  # pylint: disable=invalid-name
 
3
  import numpy as np
4
  import pandas as pd
5
  import gradio as gr
@@ -17,7 +18,8 @@ model = model_s()
17
 
18
 
19
  # def fn(text1: str, text2: str) -> np.ndarray:
20
- def fn(text1: str, text2: str) -> pd.DataFrame:
 
21
  """Define."""
22
  list1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
23
  list2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
@@ -39,7 +41,8 @@ def fn(text1: str, text2: str) -> pd.DataFrame:
39
  # raise
40
 
41
  # return res.round(2)
42
- return pd.DataFrame(res)
 
43
 
44
 
45
  out_df = gr.outputs.Dataframe(
 
1
  """Bootstrap."""
2
  # pylint: disable=invalid-name
3
+ from typing import List
4
  import numpy as np
5
  import pandas as pd
6
  import gradio as gr
 
18
 
19
 
20
  # def fn(text1: str, text2: str) -> np.ndarray:
21
+ # def fn(text1: str, text2: str) -> pd.DataFrame:
22
+ def fn(text1: str, text2: str) -> List:
23
  """Define."""
24
  list1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
25
  list2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
 
41
  # raise
42
 
43
  # return res.round(2)
44
+ # return pd.DataFrame(res)
45
+ return res.tolist()
46
 
47
 
48
  out_df = gr.outputs.Dataframe(