awinml commited on
Commit
f8b532e
1 Parent(s): 2563fc9
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -89,11 +89,13 @@ sparse_scores = np.argsort(bm25.get_scores(tokenized_query), axis=0)[::-1]
89
  indices = get_bm25_search_hits(corpus, sparse_scores, 50)
90
 
91
 
92
- dense_embedding = literal_eval(instructor_model.predict(
93
- query_embedding_instruction,
94
- query_text,
95
- api_name="/predict",
96
- ))
 
 
97
 
98
 
99
  text_embedding_instructions_choice = [
@@ -136,7 +138,7 @@ with col2:
136
  )
137
  context = format_query(matches)
138
  output_text = format_context(context)
139
-
140
  st.subheader("Retrieved Text:")
141
  for output in output_text:
142
  output = f"""{output}"""
@@ -148,16 +150,6 @@ with col2:
148
  tab1 = st.tabs(["View transcript"])
149
 
150
 
151
- with col2:
152
- st.subheader("Retrieved Text:")
153
- for output in output_text:
154
- output = f"""{output}"""
155
- st.write(
156
- f"<ul><li><p>{output}</p></li></ul>",
157
- unsafe_allow_html=True,
158
- )
159
-
160
-
161
  with tab1:
162
  file_text = retrieve_transcript()
163
  with st.expander("See Transcript"):
 
89
  indices = get_bm25_search_hits(corpus, sparse_scores, 50)
90
 
91
 
92
+ dense_embedding = literal_eval(
93
+ instructor_model.predict(
94
+ query_embedding_instruction,
95
+ query_text,
96
+ api_name="/predict",
97
+ )
98
+ )
99
 
100
 
101
  text_embedding_instructions_choice = [
 
138
  )
139
  context = format_query(matches)
140
  output_text = format_context(context)
141
+
142
  st.subheader("Retrieved Text:")
143
  for output in output_text:
144
  output = f"""{output}"""
 
150
  tab1 = st.tabs(["View transcript"])
151
 
152
 
 
 
 
 
 
 
 
 
 
 
153
  with tab1:
154
  file_text = retrieve_transcript()
155
  with st.expander("See Transcript"):