Spaces:
Runtime error
Runtime error
mend
Browse files
app.py
CHANGED
|
@@ -211,6 +211,8 @@ def create_df_for_relevant_snippets(docs):
|
|
| 211 |
"""
|
| 212 |
Create a dataframe that contains all relevant snippets.
|
| 213 |
"""
|
|
|
|
|
|
|
| 214 |
rows = []
|
| 215 |
for doc in docs:
|
| 216 |
row = {
|
|
@@ -288,7 +290,9 @@ def main():
|
|
| 288 |
st.write(agg_entailment_info)
|
| 289 |
st.markdown(f"###### Most Relevant snippets:")
|
| 290 |
df = create_df_for_relevant_snippets(docs)
|
| 291 |
-
|
| 292 |
-
|
|
|
|
|
|
|
| 293 |
|
| 294 |
main()
|
|
|
|
| 211 |
"""
|
| 212 |
Create a dataframe that contains all relevant snippets.
|
| 213 |
"""
|
| 214 |
+
if len(docs) == 0:
|
| 215 |
+
return "Não foram encontradas informações na base de sentenças verdadeiras"
|
| 216 |
rows = []
|
| 217 |
for doc in docs:
|
| 218 |
row = {
|
|
|
|
| 290 |
st.write(agg_entailment_info)
|
| 291 |
st.markdown(f"###### Most Relevant snippets:")
|
| 292 |
df = create_df_for_relevant_snippets(docs)
|
| 293 |
+
if isinstance(df, str):
|
| 294 |
+
st.markdown(df)
|
| 295 |
+
else:
|
| 296 |
+
st.dataframe(df)
|
| 297 |
|
| 298 |
main()
|