Spaces:
Build error
Build error
AhmedTaha012
commited on
Commit
•
dfed4d6
1
Parent(s):
bd80546
Update app.py
Browse files
app.py
CHANGED
@@ -210,9 +210,9 @@ def selectedCorpusForNextQuarterModel(x,quarter,year):
|
|
210 |
chunksAttention_mask=[tokens["attention_mask"][0][r*splitSize:(r+1)*splitSize] for r in range(math.ceil(len(tokens["attention_mask"][0])/splitSize))]
|
211 |
l=[]
|
212 |
for idx in range(len(chunksInput_ids)):
|
213 |
-
l.append({"input_ids":torch.tensor([list(chunksInput_ids[idx])])
|
214 |
-
"token_type_ids":torch.tensor([list(chunksToken_type_ids[idx])])
|
215 |
-
"attention_mask":torch.tensor([list(chunksAttention_mask[idx])])
|
216 |
})
|
217 |
|
218 |
selectedTopics = ["Stock Movement", "Earnings", "IPO", "Stock Commentary", "Currencies", "M&A | Investments", "Financials", "Macro", "Analyst Update", "Company | Product News"]
|
|
|
210 |
chunksAttention_mask=[tokens["attention_mask"][0][r*splitSize:(r+1)*splitSize] for r in range(math.ceil(len(tokens["attention_mask"][0])/splitSize))]
|
211 |
l=[]
|
212 |
for idx in range(len(chunksInput_ids)):
|
213 |
+
l.append({"input_ids":torch.tensor([list(chunksInput_ids[idx])]),
|
214 |
+
"token_type_ids":torch.tensor([list(chunksToken_type_ids[idx])]),
|
215 |
+
"attention_mask":torch.tensor([list(chunksAttention_mask[idx])])
|
216 |
})
|
217 |
|
218 |
selectedTopics = ["Stock Movement", "Earnings", "IPO", "Stock Commentary", "Currencies", "M&A | Investments", "Financials", "Macro", "Analyst Update", "Company | Product News"]
|