pschofield2 commited on
Commit
b50135a
·
verified ·
1 Parent(s): abe10e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -42,20 +42,7 @@ def fetch_trades_of_the_day():
42
  )
43
 
44
  # Define the query
45
- query = """SELECT
46
- TICKER,
47
- RSI_CURRENT,
48
- RSI_CONDITION,
49
- CONSECUTIVE_DAYS_IN_RSI_CONDITION,
50
- HISTORICAL_OCCURRENCES,
51
- MEDIAN_FORWARD_5DAY_RETURN_PERCENT,
52
- AVG_FORWARD_5DAY_RETURN_PERCENT,
53
- POSITIVE_RATE,
54
- NEGATIVE_RATE
55
-
56
- FROM researchdata.RSI_TRADE_OF_THE_DAY
57
-
58
- ORDER BY trade_rank;"""
59
 
60
  # Execute the query and fetch data
61
  cur = conn.cursor()
@@ -90,7 +77,7 @@ def interact_with_assistant(user_input):
90
 
91
  run = client.beta.threads.runs.create(
92
  thread_id=thread.id,
93
- assistant_id='asst_WeygFo0phjmDVfjzyM9zktgl', # Replace with your actual assistant ID
94
  )
95
 
96
  while run.status != 'completed':
 
42
  )
43
 
44
  # Define the query
45
+ query = os.environ['QUERY']
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  # Execute the query and fetch data
48
  cur = conn.cursor()
 
77
 
78
  run = client.beta.threads.runs.create(
79
  thread_id=thread.id,
80
+ assistant_id= os.environ['ASSISTANT_ID'],
81
  )
82
 
83
  while run.status != 'completed':