tseronni commited on
Commit
58e9af0
·
1 Parent(s): ba82b52

first commit

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -19,6 +19,7 @@ from chatgpt import MessageChatCompletion
19
  # df.to_csv('subsectors.csv', index=False)
20
 
21
  df = pd.read_csv('subsectors.csv')
 
22
 
23
 
24
  def build_context(row):
@@ -57,6 +58,7 @@ def click_button(model, api_key, abstract):
57
  "\n3. Non-selected Subsectors: "
58
  "\n\t- If a subsector had a high probability of being a match but was ultimately not chosen because the abstract contained terms from the 'Does not include' list, provide a brief explanation. Highlight the specific 'Does not include' terms found and why this led to the subsector's exclusion."
59
  f"\n4. Probability: Provide a dictionary containing the subsectors ({labels}) and their corresponding probabilities of being a match. Each probability should be formatted to show two decimal places."
 
60
  "\nYour task is to classify the following patent abstract into the appropriate subsector(s), taking into account the details of each subsector as described above. Here are the subsectors and their definitions for your reference:\n"
61
  f"{contexts}"
62
  )
 
19
  # df.to_csv('subsectors.csv', index=False)
20
 
21
  df = pd.read_csv('subsectors.csv')
22
+ df.fillna('', inplace=True)
23
 
24
 
25
  def build_context(row):
 
58
  "\n3. Non-selected Subsectors: "
59
  "\n\t- If a subsector had a high probability of being a match but was ultimately not chosen because the abstract contained terms from the 'Does not include' list, provide a brief explanation. Highlight the specific 'Does not include' terms found and why this led to the subsector's exclusion."
60
  f"\n4. Probability: Provide a dictionary containing the subsectors ({labels}) and their corresponding probabilities of being a match. Each probability should be formatted to show two decimal places."
61
+ "\n5. Suggested Subsector: Based on the primary classification in item 1, suggest a more specialized area or a closely related subsector within it. This suggestion should delve deeper into the nuances of the primary subsector, targeting areas of emerging interest, innovation, or specialization that align with the abstract's content and the initial subsector's broader context."
62
  "\nYour task is to classify the following patent abstract into the appropriate subsector(s), taking into account the details of each subsector as described above. Here are the subsectors and their definitions for your reference:\n"
63
  f"{contexts}"
64
  )