Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -215,7 +215,8 @@ def load_reviews_from_file(file_path):
|
|
215 |
|
216 |
#Demo Section
|
217 |
st.title("SpaGAN Demo: IN PROGRESS")
|
218 |
-
st.write("This demo allows you to select from a list of sample reviews that contrain both real and fake reviews.
|
|
|
219 |
|
220 |
# Define a color map and descriptions for different entity types
|
221 |
COLOR_MAP = {
|
@@ -253,8 +254,14 @@ if st.button("Highlight Geo-Entities"):
|
|
253 |
st.write("Concatenated Embedding:", combined_embedding)
|
254 |
|
255 |
prediction = get_prediction(combined_embedding)
|
256 |
-
st.write("Prediction:", prediction)
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
# Process the text using spaCy
|
259 |
doc = nlp(selected_review)
|
260 |
|
|
|
215 |
|
216 |
#Demo Section
|
217 |
st.title("SpaGAN Demo: IN PROGRESS")
|
218 |
+
st.write("This demo allows you to select from a list of sample reviews that contrain both real and fake reviews.
|
219 |
+
This demo will highlight all the entity types found within the review and display the prediction of the model.")
|
220 |
|
221 |
# Define a color map and descriptions for different entity types
|
222 |
COLOR_MAP = {
|
|
|
254 |
st.write("Concatenated Embedding:", combined_embedding)
|
255 |
|
256 |
prediction = get_prediction(combined_embedding)
|
|
|
257 |
|
258 |
+
if(prediction == 0):
|
259 |
+
st.write("Prediction: Not Spam")
|
260 |
+
else if(prediction == 1):
|
261 |
+
st.write("Prediction: Spam")
|
262 |
+
else:
|
263 |
+
st.write("error during prediction")
|
264 |
+
|
265 |
# Process the text using spaCy
|
266 |
doc = nlp(selected_review)
|
267 |
|