Spaces:
Build error
Build error
freemt
commited on
Commit
•
71fa1a4
1
Parent(s):
6663376
Fix gr.HTML outputs
Browse files- ubee/__main__.py +3 -8
ubee/__main__.py
CHANGED
@@ -114,14 +114,9 @@ def ifn(text1, text2, thresh):
|
|
114 |
# return out_df, pd.DataFrame(res1_, columns=["text1", "text2", "likelihood"]), _
|
115 |
|
116 |
df = pd.DataFrame(res1_, columns=["text1", "text2", "likelihood"])
|
117 |
-
if df
|
118 |
-
|
119 |
-
else
|
120 |
-
html1 = ""
|
121 |
-
if _:
|
122 |
-
html2 = _.to_html()
|
123 |
-
else:
|
124 |
-
html2 = ""
|
125 |
|
126 |
return html1, html2
|
127 |
|
|
|
114 |
# return out_df, pd.DataFrame(res1_, columns=["text1", "text2", "likelihood"]), _
|
115 |
|
116 |
df = pd.DataFrame(res1_, columns=["text1", "text2", "likelihood"])
|
117 |
+
html1 = df.to_html() if df is not None else df
|
118 |
+
|
119 |
+
html2 = _.to_html() if _ is not None else _
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
return html1, html2
|
122 |
|