JaphetHernandez commited on
Commit
219f9d3
·
verified ·
1 Parent(s): 2b17ca4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -63,18 +63,9 @@ def main():
63
  # Prompt inicial
64
  initial_prompt = (""""
65
  f"You are an AI assistant. You have a list of job titles in {job_titles} and a search query {query}.\n"
66
- f"Your task is to rank these job titles {job_titles} by their semantic similarity to the given query {query}. "
67
- f"Please provide the ranking from most relevant to least relevant. "
68
- f"Do not calculate cosine similarity; instead, focus on understanding the semantic relevance of each job title in {job_titles] to the query {query}.\n"
69
- f"\n"
70
- f"Format your response like this:\n"
71
- f"1. [Most Relevant Job Title]\n"
72
- f"2. [Second Most Relevant Job Title]\n"
73
- f"...\n"
74
- f"N. [Least Relevant Job Title]\n"
75
- f"\n"
76
- f"Query: \"{query}\"\n"
77
- f"Job Titles: {job_titles}\n"
78
  """
79
  )
80
  st.write(f"Query: {query}")
 
63
  # Prompt inicial
64
  initial_prompt = (""""
65
  f"You are an AI assistant. You have a list of job titles in {job_titles} and a search query {query}.\n"
66
+ f"Your task is to rank these job titles {job_titles} by their semantic similarity to the given query {query} using the cosine similarity score.\n "
67
+ f"Create a dataframe called df_2 that includes a column 'titles' with the values of {job_titles} and a new column called 'score' in which you will record the cosine similarity score that you calculated previously.\n"
68
+ f"Finally, print df_2 in the screen"
 
 
 
 
 
 
 
 
 
69
  """
70
  )
71
  st.write(f"Query: {query}")