Update app.py
Browse files
app.py
CHANGED
@@ -133,7 +133,7 @@ def cross_encode():
|
|
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:
|
137 |
df['Score'] = round(df['Score'],2)
|
138 |
|
139 |
return df
|
|
|
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:2]],columns=['Score','Text'])
|
137 |
df['Score'] = round(df['Score'],2)
|
138 |
|
139 |
return df
|