Update app.py
Browse files
app.py
CHANGED
@@ -133,15 +133,12 @@ def cross_encode():
|
|
133 |
|
134 |
def display_as_table(model, score='score'):
|
135 |
# Display the df with text and scores as a table
|
136 |
-
|
137 |
-
df
|
138 |
-
|
139 |
-
|
140 |
return df
|
141 |
|
142 |
|
143 |
-
|
144 |
-
|
145 |
st.title("Search Your Query Here")
|
146 |
window_size = 3
|
147 |
|
|
|
133 |
|
134 |
def display_as_table(model, score='score'):
|
135 |
# Display the df with text and scores as a table
|
136 |
+
df = pd.DataFrame([(hit[score],passages[hit['corpus_id']]) for hit in model[0:top_k]],columns=['Score','Text'])
|
137 |
+
df['Score'] = round(df['Score'],2)
|
138 |
+
|
|
|
139 |
return df
|
140 |
|
141 |
|
|
|
|
|
142 |
st.title("Search Your Query Here")
|
143 |
window_size = 3
|
144 |
|