nicholasKluge commited on
Commit
94d458b
1 Parent(s): e7c75e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -127,9 +127,8 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
127
  out_dataframe = gr.Dataframe(
128
  headers=df.columns.tolist(),
129
  datatype=["str", "str", "str"],
130
- max_rows=5,
131
  col_count=(3, "fixed"),
132
- overflow_row_behaviour='paginate',
133
  wrap=True,
134
  interactive=False
135
  )
@@ -226,14 +225,14 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
226
  cosine_similarities = cosine_similarity(prompt_tfidf_matrix, search_vector)
227
  temp_df['Cosine Similarity'] = cosine_similarities
228
  temp_df.sort_values('Cosine Similarity', ascending=False, inplace=True)
229
- return temp_df.head()
230
 
231
  elif column_name == 'Completion':
232
  search_vector = completion_tfidf_vectorizer.transform([search_string])
233
  cosine_similarities = cosine_similarity(completion_tfidf_matrix, search_vector)
234
  temp_df['Cosine Similarity'] = cosine_similarities
235
  temp_df.sort_values('Cosine Similarity', ascending=False, inplace=True)
236
- return temp_df.head()
237
 
238
 
239
 
 
127
  out_dataframe = gr.Dataframe(
128
  headers=df.columns.tolist(),
129
  datatype=["str", "str", "str"],
130
+ row_count=10,
131
  col_count=(3, "fixed"),
 
132
  wrap=True,
133
  interactive=False
134
  )
 
225
  cosine_similarities = cosine_similarity(prompt_tfidf_matrix, search_vector)
226
  temp_df['Cosine Similarity'] = cosine_similarities
227
  temp_df.sort_values('Cosine Similarity', ascending=False, inplace=True)
228
+ return temp_df.head(10)
229
 
230
  elif column_name == 'Completion':
231
  search_vector = completion_tfidf_vectorizer.transform([search_string])
232
  cosine_similarities = cosine_similarity(completion_tfidf_matrix, search_vector)
233
  temp_df['Cosine Similarity'] = cosine_similarities
234
  temp_df.sort_values('Cosine Similarity', ascending=False, inplace=True)
235
+ return temp_df.head(10)
236
 
237
 
238