SelmaNajih001 commited on
Commit
9fa187a
·
verified ·
1 Parent(s): a28f187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -17,9 +17,9 @@ pipe = pipeline(
17
  model=model_name,
18
  tokenizer=model_name,
19
  max_new_tokens=250,
20
- temperature=0.5,
21
  do_sample=False,
22
- num_beams=4,
23
  repetition_penalty=1.5,
24
  return_full_text=False,
25
  eos_token_id=tokenizer.eos_token_id
@@ -29,17 +29,19 @@ pipe = pipeline(
29
  prompt_template = """
30
  You are a financial market analyst.
31
  Before making a prediction, you always analyze the past, which is provided in the Context below.
32
- When analyzing the Context, pay close attention to the dates and the economic conditions of that period
33
- (e.g., interest rate changes, inflation trends, sector performance, or geopolitical events).
34
  Base your reasoning on what actually happened during that specific timeframe.
35
 
36
- If, in the past, given an event, multiple stocks have changed, provide a list of those stocks along with their price changes.
37
- If a specific event led to different stock price reactions under varying circumstances
38
- (for example, depending on whether interest rates were rising or falling), describe each plausible scenario and explain the reasoning behind the reaction in each case.
39
 
40
  Please respond with:
41
- -Chosen Stock or list of Stocks: (name/names)
 
 
42
  -Prediction(s): (expected price change)
 
43
  -Explanation: (brief, clear, and based on past patterns — mention the time period and the factors influencing the outcome)
44
 
45
  Context:
 
17
  model=model_name,
18
  tokenizer=model_name,
19
  max_new_tokens=250,
20
+ temperature=0.0,
21
  do_sample=False,
22
+ num_beams=6,
23
  repetition_penalty=1.5,
24
  return_full_text=False,
25
  eos_token_id=tokenizer.eos_token_id
 
29
  prompt_template = """
30
  You are a financial market analyst.
31
  Before making a prediction, you always analyze the past, which is provided in the Context below.
32
+
33
+ When analyzing the Context, pay close attention to the dates and the economic conditions of that period (e.g., interest rate changes, inflation trends, sector performance, or geopolitical events).
34
  Base your reasoning on what actually happened during that specific timeframe.
35
 
36
+ If, in the past, a given event caused changes in multiple stocks, provide a list of those stocks along with their price movements.
37
+ If a specific event led to different stock price reactions under varying circumstances (for example, depending on whether interest rates were rising or falling), describe each plausible scenario and explain the reasoning behind the reaction in each case.
 
38
 
39
  Please respond with:
40
+
41
+ -Chosen Stock or List of Stocks: (name/names)
42
+
43
  -Prediction(s): (expected price change)
44
+
45
  -Explanation: (brief, clear, and based on past patterns — mention the time period and the factors influencing the outcome)
46
 
47
  Context: