fosse commited on
Commit
0fe78bd
·
verified ·
1 Parent(s): 27e9aeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -48,13 +48,12 @@ def fetch_message_from_newsweb(url: str) -> str:
48
  return f"Error fetching data from API: {e}"
49
 
50
  @tool
51
- def newsworthiness_detection(fetch_message_from_newsweb: str, newsworthiness_prompt: str) -> str:
52
  """
53
  Determines the newsworthiness of a stock market announcement using a predefined prompt.
54
 
55
  Args:
56
- fetch_message_from_newsweb (str): The stock market message content or a URL to the announcement.
57
- newsworthiness_prompt (str): A predefined prompt {prompt_text} to assess newsworthiness of the message.
58
 
59
  Returns:
60
  str: A rating of newsworthiness ("HØY", "MEDIUM", or "LAV") along with a short explanation of the decision.
@@ -94,7 +93,7 @@ def newsworthiness_detection(fetch_message_from_newsweb: str, newsworthiness_pro
94
  - Om det er lav sannsynlighet for at meldingen vil påvirke aksjemarkedet, vil du vurdere at meldingen har **LAV nyhetsverdi**.
95
  """
96
 
97
- full_prompt = f"""{newsworthiness_prompt}
98
 
99
  --- Børsmelding ---
100
  {fetch_message_from_newsweb}
 
48
  return f"Error fetching data from API: {e}"
49
 
50
  @tool
51
+ def newsworthiness_detection(fetch_message_from_newsweb: str) -> str:
52
  """
53
  Determines the newsworthiness of a stock market announcement using a predefined prompt.
54
 
55
  Args:
56
+ fetch_message_from_newsweb (str): The stock market message content returned from the function.
 
57
 
58
  Returns:
59
  str: A rating of newsworthiness ("HØY", "MEDIUM", or "LAV") along with a short explanation of the decision.
 
93
  - Om det er lav sannsynlighet for at meldingen vil påvirke aksjemarkedet, vil du vurdere at meldingen har **LAV nyhetsverdi**.
94
  """
95
 
96
+ full_prompt = f"""{prompt_text}
97
 
98
  --- Børsmelding ---
99
  {fetch_message_from_newsweb}