Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
from transformers import pipeline
|
| 4 |
|
|
@@ -27,6 +28,6 @@ if text:
|
|
| 27 |
for index, r in enumerate(result):
|
| 28 |
if r['token_str'].lower().strip() in history_keyword_text.lower().strip():
|
| 29 |
result[index]['score']*=HISTORY_WEIGHT
|
| 30 |
-
|
| 31 |
-
result={k: v for k, v in sorted(result.items(), key=lambda item: item[0])}
|
| 32 |
-
st.table(
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
|
| 4 |
from transformers import pipeline
|
| 5 |
|
|
|
|
| 28 |
for index, r in enumerate(result):
|
| 29 |
if r['token_str'].lower().strip() in history_keyword_text.lower().strip():
|
| 30 |
result[index]['score']*=HISTORY_WEIGHT
|
| 31 |
+
df=pd.DataFrame(result)
|
| 32 |
+
#result={k: v for k, v in sorted(result.items(), key=lambda item: item[0])}
|
| 33 |
+
st.table(df)
|