Guiyom commited on
Commit
ee0aeab
·
1 Parent(s): 7ec6c5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -122,6 +122,7 @@ with gr.Blocks(theme=gr.themes.Glass()) as demo:
122
  queryforcategory = [{'role':'user','content':f"Out of this list of words/expressions separated by a comma:\n{listvalues}\n, which one corresponds the best to the theme in this message:\n{msg}\n\nThe result should be one of the elements from the list only. If there's absolutly no match, return an empty string ''\nHere is an example:\n if the list contains 'Skills,Finding work' and the message is 'I want to learn about Excel', just reply 'Skills' "}]
123
  matchcat = answer(queryforcategory)
124
  matchcat = matchcat.replace('.','')
 
125
  print(f'matchcat: {matchcat}')
126
  try:
127
  instructions = filter_and_concatenate(df, matchcat)
 
122
  queryforcategory = [{'role':'user','content':f"Out of this list of words/expressions separated by a comma:\n{listvalues}\n, which one corresponds the best to the theme in this message:\n{msg}\n\nThe result should be one of the elements from the list only. If there's absolutly no match, return an empty string ''\nHere is an example:\n if the list contains 'Skills,Finding work' and the message is 'I want to learn about Excel', just reply 'Skills' "}]
123
  matchcat = answer(queryforcategory)
124
  matchcat = matchcat.replace('.','')
125
+ matchcat = matchcat.strip()
126
  print(f'matchcat: {matchcat}')
127
  try:
128
  instructions = filter_and_concatenate(df, matchcat)