Jai12345 commited on
Commit
7478c1e
1 Parent(s): 7d794de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
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
- index=1
137
- df = pd.DataFrame([index], passages[hit['corpus_id']]) for hit in model[0:2]], columns=['Index', 'Text'])
138
- index+=1
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