Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
demo.py
CHANGED
@@ -5,6 +5,8 @@ import json
|
|
5 |
import random
|
6 |
from utils import *
|
7 |
|
|
|
|
|
8 |
# Function to handle summarization based on the selected method
|
9 |
def summarize(text: str, method: str) -> str:
|
10 |
processed_text = ' '.join(text.split("\n"))
|
|
|
5 |
import random
|
6 |
from utils import *
|
7 |
|
8 |
+
nltk.download('punkt')
|
9 |
+
|
10 |
# Function to handle summarization based on the selected method
|
11 |
def summarize(text: str, method: str) -> str:
|
12 |
processed_text = ' '.join(text.split("\n"))
|
utils.py
CHANGED
@@ -5,6 +5,8 @@ import json
|
|
5 |
import os
|
6 |
import pickle
|
7 |
import re
|
|
|
|
|
8 |
hf_tokens = []
|
9 |
|
10 |
filepath = __file__.replace("\\", "/").replace("utils.py", "")
|
|
|
5 |
import os
|
6 |
import pickle
|
7 |
import re
|
8 |
+
|
9 |
+
nltk.download('punkt')
|
10 |
hf_tokens = []
|
11 |
|
12 |
filepath = __file__.replace("\\", "/").replace("utils.py", "")
|