Spaces:
Build error
Build error
Commit ·
32155ac
1
Parent(s): b6cd1ac
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,13 +22,12 @@ import nltk
|
|
| 22 |
nltk.download('stopwords')
|
| 23 |
texts=["nokia"]
|
| 24 |
#print(make_prediction(texts))
|
| 25 |
-
|
| 26 |
-
st.write(texts[0])
|
| 27 |
-
data,df=entity_extractor.input_text(texts)
|
| 28 |
-
probs = entity_extractor.extract_entity_probabilities( dataset=data)
|
| 29 |
-
for i in range(len(probs)):
|
| 30 |
-
prediction="Predicted Company Ticker: \n"+str(list(LABEL_MAP.keys())[list(LABEL_MAP.values()).index(np.argmax(probs[i]))])+'\n'
|
| 31 |
-
return prediction
|
| 32 |
texts=["Nokia"]
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
nltk.download('stopwords')
|
| 23 |
texts=["nokia"]
|
| 24 |
#print(make_prediction(texts))
|
| 25 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
texts=["Nokia"]
|
| 27 |
+
st.write(texts[0])
|
| 28 |
+
data,df=entity_extractor.input_text(texts)
|
| 29 |
+
probs = entity_extractor.extract_entity_probabilities( dataset=data)
|
| 30 |
+
for i in range(len(probs)):
|
| 31 |
+
prediction="Predicted Company Ticker: \n"+str(list(LABEL_MAP.keys())[list(LABEL_MAP.values()).index(np.argmax(probs[i]))])+'\n'
|
| 32 |
+
|
| 33 |
+
st.write(prediction)
|