Spaces:
Runtime error
Runtime error
Commit
·
73f115b
1
Parent(s):
a308746
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np # linear algebra
|
| 2 |
+
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
|
| 3 |
+
from transformers import AutoTokenizer
|
| 4 |
+
from transformers import TFAutoModelForQuestionAnswering
|
| 5 |
+
from datasets import Dataset
|
| 6 |
+
|
| 7 |
+
#prompts
|
| 8 |
+
st.title("Tweet Sentiment Extractor...")
|
| 9 |
+
|
| 10 |
+
# take text/tweet input
|
| 11 |
+
textbox = st.text_area('Write your text in this box:', '',height=100, max_chars=500 )
|
| 12 |
+
option = st.selectbox(
|
| 13 |
+
'How would you like to be contacted?',
|
| 14 |
+
('Email', 'Home phone', 'Mobile phone'))
|
| 15 |
+
|
| 16 |
+
st.write('You selected:', option)
|
| 17 |
+
|
| 18 |
+
#MAX_LENGTH = 105
|
| 19 |
+
|
| 20 |
+
#dataset = Dataset.from_dict(X)
|
| 21 |
+
|