Spaces:
Sleeping
Sleeping
added model
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import wna_googlenews as wna
|
|
|
3 |
|
4 |
|
5 |
st.title("WNA Google News App")
|
@@ -16,9 +17,13 @@ settings = {
|
|
16 |
"period": days_range
|
17 |
}
|
18 |
|
|
|
19 |
|
20 |
|
21 |
if st.button("Search"):
|
22 |
df = wna.get_news(settings, query)
|
23 |
st.dataframe(df)
|
|
|
|
|
|
|
24 |
|
|
|
1 |
import streamlit as st
|
2 |
import wna_googlenews as wna
|
3 |
+
from transformers import pipeline
|
4 |
|
5 |
|
6 |
st.title("WNA Google News App")
|
|
|
17 |
"period": days_range
|
18 |
}
|
19 |
|
20 |
+
classifier = pipeline(task="text-classification", model="SamLowe/roberta-base-go_emotions", top_k=None)
|
21 |
|
22 |
|
23 |
if st.button("Search"):
|
24 |
df = wna.get_news(settings, query)
|
25 |
st.dataframe(df)
|
26 |
+
sentences = ["I am not having a great day"]
|
27 |
+
model_outputs = classifier(sentences)
|
28 |
+
st.write(model_outputs[0])
|
29 |
|