niyaa commited on
Commit
19e5e9a
·
1 Parent(s): 072101a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -105,9 +105,9 @@ if tickerSymbol:
105
 
106
  #date = datetime.date(start_date)
107
  date_str = start_date.strftime("%Y-%m-%d")
108
- st.write(date_str)
109
  df = tickerDf[tickerDf["Date"]==date_str]
110
- st.write(df)
111
 
112
  if (df["Close"][0] > df["Open"][0] ):
113
  st.write("NSE has uptrend on " +date_str )
@@ -123,7 +123,7 @@ if tickerSymbol:
123
 
124
 
125
 
126
-
127
  headlines = scrapper(start_date)
128
  index = [idx for idx, s in enumerate(headlines) if s=='Most Read' ][0]
129
  del headlines[index:]
@@ -136,10 +136,6 @@ if tickerSymbol:
136
  news = news.reset_index(drop=True)
137
 
138
 
139
-
140
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
141
-
142
-
143
  tokenizer = AutoTokenizer.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
144
  model = AutoModelForSequenceClassification.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
145
 
 
105
 
106
  #date = datetime.date(start_date)
107
  date_str = start_date.strftime("%Y-%m-%d")
108
+ #st.write(date_str)
109
  df = tickerDf[tickerDf["Date"]==date_str]
110
+ #st.write(df)
111
 
112
  if (df["Close"][0] > df["Open"][0] ):
113
  st.write("NSE has uptrend on " +date_str )
 
123
 
124
 
125
 
126
+ Begindatestring = start_date
127
  headlines = scrapper(start_date)
128
  index = [idx for idx, s in enumerate(headlines) if s=='Most Read' ][0]
129
  del headlines[index:]
 
136
  news = news.reset_index(drop=True)
137
 
138
 
 
 
 
 
139
  tokenizer = AutoTokenizer.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
140
  model = AutoModelForSequenceClassification.from_pretrained("nickmuchi/sec-bert-finetuned-finance-classification")
141