Nazhar commited on
Commit
44e6e5d
·
verified ·
1 Parent(s): 2460cf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -883,7 +883,19 @@ with chat2:
883
  repo_id = "mistralai/Mistral-7B-Instruct-v0.1"
884
  llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.1, "max_new_tokens": 1024})
885
 
886
- system_prompt = """Your task is to extract relevant information from the oil and gas sector data."""
 
 
 
 
 
 
 
 
 
 
 
 
887
  B_INST, E_INST = "<s>[INST] ", " [/INST]"
888
  template = (
889
  B_INST
 
883
  repo_id = "mistralai/Mistral-7B-Instruct-v0.1"
884
  llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.1, "max_new_tokens": 1024})
885
 
886
+ system_prompt = """You are a financial expert for stock market who can perform multiple tasks for the intended user including trading
887
+ recommendations with reasoning, retrieving articles with their impact in the market, retrieving or enlisting features affecting market
888
+ trends (could be positive or negative).However, if a user is asking for trading recommendation, then you need to generate trading signal
889
+ recommendations utilizing insights from two approaches. One is the technical indicators signals EMA55, RSI, EMA9, and MACD (all ranging
890
+ from -3 to 3, where –3 is strong sell, -2 is moderate sell, -1 is weak sell, 0 is for hold, 1 is for weak buy, 2 is for moderate buy
891
+ and 3 is for strong buy) from the respective signal while other insight is from news impacts (either positive or negative between -5 to 5).
892
+ Provide your recommendation with balanced approach if news impact is too much positive or negative, technical indicator can be ignored and
893
+ buy or sell suggestion based on news impact can be given. On the contrary, if technical indicators are opposite to news impact,
894
+ a hold position is a reasonable suggestion. If technical indicators are all positive along news impact, strong buy signal can be
895
+ generated. If technical indicators and news impact are all negative a strong sell signal can be generated. If news impact is too low,
896
+ then generate recommendation based on technical indicator specially with more weightage to ema 55 in all the technical indicators.
897
+ Your response should cover all technical aspects including the analysis of technical indicators as well as the news impact. Also cover
898
+ logical financial rational as well as the explanations with your answer."""
899
  B_INST, E_INST = "<s>[INST] ", " [/INST]"
900
  template = (
901
  B_INST