Spaces:
Runtime error
Runtime error
Commit
·
ab73934
1
Parent(s):
8ad5809
Update app.py
Browse files
app.py
CHANGED
@@ -30,8 +30,8 @@ textbox = st.text_area('Write your text in this box:', '',height=100, max_chars
|
|
30 |
option = st.selectbox(
|
31 |
'How would you like to be contacted?',
|
32 |
('positive', 'negative', 'neutral'))
|
33 |
-
|
34 |
|
|
|
35 |
python_dict = {"text":[textbox], "sentiment":[option]}
|
36 |
|
37 |
dataset = Dataset.from_dict(python_dict)
|
@@ -114,7 +114,7 @@ if button:
|
|
114 |
processed_raw_df = processed_raw_data[:]
|
115 |
processed_raw_df["start_logits"] = start_logits.tolist()
|
116 |
processed_raw_df["end_logits"] = end_logits.tolist()
|
117 |
-
processed_raw_df["text"] =
|
118 |
|
119 |
final_data = Dataset.from_pandas(processed_raw_df)
|
120 |
final_data = final_data.map(predict_answers,batched=True)
|
|
|
30 |
option = st.selectbox(
|
31 |
'How would you like to be contacted?',
|
32 |
('positive', 'negative', 'neutral'))
|
|
|
33 |
|
34 |
+
st.write(option)
|
35 |
python_dict = {"text":[textbox], "sentiment":[option]}
|
36 |
|
37 |
dataset = Dataset.from_dict(python_dict)
|
|
|
114 |
processed_raw_df = processed_raw_data[:]
|
115 |
processed_raw_df["start_logits"] = start_logits.tolist()
|
116 |
processed_raw_df["end_logits"] = end_logits.tolist()
|
117 |
+
processed_raw_df["text"] = python_dict["text"]
|
118 |
|
119 |
final_data = Dataset.from_pandas(processed_raw_df)
|
120 |
final_data = final_data.map(predict_answers,batched=True)
|