Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,7 +107,7 @@ def analyze_article(text: str) -> dict:
|
|
| 107 |
ner_results = models["ner"](safe_text)
|
| 108 |
extracted_entities = list(set([ent["word"] for ent in ner_results if ent["score"] > 0.6]))
|
| 109 |
|
| 110 |
-
# Subjectivity
|
| 111 |
subjectivity_score = TextBlob(safe_text).sentiment.subjectivity
|
| 112 |
reading_ease = textstat.flesch_reading_ease(safe_text)
|
| 113 |
|
|
@@ -231,7 +231,7 @@ def check_contradiction(text_a: str, text_b: str) -> dict:
|
|
| 231 |
return {"relationship": result["label"], "confidence": result["score"]}
|
| 232 |
|
| 233 |
|
| 234 |
-
# USER INTERFACE
|
| 235 |
st.set_page_config(page_title="FrameVis | Media Framing", layout="wide")
|
| 236 |
|
| 237 |
# STATE MANAGEMENT
|
|
|
|
| 107 |
ner_results = models["ner"](safe_text)
|
| 108 |
extracted_entities = list(set([ent["word"] for ent in ner_results if ent["score"] > 0.6]))
|
| 109 |
|
| 110 |
+
# Subjectivity and Readability Analysis
|
| 111 |
subjectivity_score = TextBlob(safe_text).sentiment.subjectivity
|
| 112 |
reading_ease = textstat.flesch_reading_ease(safe_text)
|
| 113 |
|
|
|
|
| 231 |
return {"relationship": result["label"], "confidence": result["score"]}
|
| 232 |
|
| 233 |
|
| 234 |
+
# USER INTERFACE
|
| 235 |
st.set_page_config(page_title="FrameVis | Media Framing", layout="wide")
|
| 236 |
|
| 237 |
# STATE MANAGEMENT
|