Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,19 +62,6 @@ def analyze_and_complete(file_paths):
|
|
62 |
quotes = nltk_extract_quotes(text)
|
63 |
token_count = count_tokens(text)
|
64 |
|
65 |
-
# Save results to files
|
66 |
-
with open(os.path.join(output_directory, f"{filename_prefix}_spacy_entities.txt"), "w", encoding="utf-8") as file:
|
67 |
-
file.write(str(spacy_entities))
|
68 |
-
|
69 |
-
with open(os.path.join(output_directory, f"{filename_prefix}_sentences.txt"), "w", encoding="utf-8") as file:
|
70 |
-
file.write("\n".join(sentences))
|
71 |
-
|
72 |
-
with open(os.path.join(output_directory, f"{filename_prefix}_quotes.txt"), "w", encoding="utf-8") as file:
|
73 |
-
file.write("\n".join(quotes))
|
74 |
-
|
75 |
-
with open(os.path.join(output_directory, f"{filename_prefix}_token_count.txt"), "w", encoding="utf-8") as file:
|
76 |
-
file.write(str(token_count))
|
77 |
-
|
78 |
results.append((str(spacy_entities), "\n".join(sentences), "\n".join(quotes), str(token_count)))
|
79 |
return results
|
80 |
|
|
|
62 |
quotes = nltk_extract_quotes(text)
|
63 |
token_count = count_tokens(text)
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
results.append((str(spacy_entities), "\n".join(sentences), "\n".join(quotes), str(token_count)))
|
66 |
return results
|
67 |
|