Spaces:
Sleeping
Sleeping
typo indentation
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def text_analysis(text:str)-> str:
|
|
| 42 |
sentence_count = len(sentences)
|
| 43 |
reading_level = textstat.flesch_kincaid_grade(text)
|
| 44 |
most_common_words = Counter(words).most_common(5)
|
| 45 |
-
|
| 46 |
except Exception as e:
|
| 47 |
return f"I could not complete the task. I got this error: {e}"
|
| 48 |
|
|
|
|
| 42 |
sentence_count = len(sentences)
|
| 43 |
reading_level = textstat.flesch_kincaid_grade(text)
|
| 44 |
most_common_words = Counter(words).most_common(5)
|
| 45 |
+
return f"I completed the analysis. The text has {word_count} words and {sentence_count} sentences. The reading level is {reading_level}. The 5 most common words are {most_common_words}"
|
| 46 |
except Exception as e:
|
| 47 |
return f"I could not complete the task. I got this error: {e}"
|
| 48 |
|