Spaces:
Build error
Build error
Commit ·
21fccbb
1
Parent(s): 34c68b5
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -26,15 +26,12 @@ def single_predict(text):
|
|
| 26 |
prediction.plot(preds)
|
| 27 |
|
| 28 |
def batch_predict(data):
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
else:
|
| 36 |
-
st.error(f'Data Validation Failed :thumbsdown:')
|
| 37 |
-
|
| 38 |
st.title('Toxic Comment Classifier')
|
| 39 |
|
| 40 |
tab1, tab2 = st.tabs(["Single Value Prediciton","Batch Prediction"])
|
|
|
|
| 26 |
prediction.plot(preds)
|
| 27 |
|
| 28 |
def batch_predict(data):
|
| 29 |
+
print("batch in")
|
| 30 |
+
st.success(f'Data Validation Successfull :thumbsup:')
|
| 31 |
+
preds = prediction.batch_predict(data)
|
| 32 |
+
print(type(preds))
|
| 33 |
+
return preds.to_csv(index=False).encode('utf-8')
|
| 34 |
+
|
|
|
|
|
|
|
|
|
|
| 35 |
st.title('Toxic Comment Classifier')
|
| 36 |
|
| 37 |
tab1, tab2 = st.tabs(["Single Value Prediciton","Batch Prediction"])
|