Spaces:
Runtime error
Runtime error
Update app.py
Browse files13 unmodified lines1415161718171819202192 unmodified lines1141151161171171181191204 unmodified lines125126127128129130131146 unmodified lines27827928028028113 unmodified linesfrom utils import load_example_filenames, truncate_word_count, saves_summaryfrom textrank import get_summary
example_path = "/content/drive/MyDrive/space/"nltk.download("stopwords") # TODO=find where this requirement originates fromexample_path = "./"nltk.download("stopwords")
logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"92 unmodified lines
def load_single_example_text( example_path: str or Path="/content/example.txt", example_path: str or Path="./example.txt", max_pages=20,): """4 unmodified lines global name_to_path full_ex_path = name_to_path[example_path] full_ex_path = Path(full_ex_path)
if full_ex_path.suffix == ".txt": with open(full_ex_path, "r", encoding="utf-8", errors="ignore") as f: raw_text = f.read()146 unmodified lines outputs=[output_text, summary_text, summary_scores, text_file], )
demo.launch(enable_queue=True, debug=True) demo.launch(share=True,enable_queue=True, debug=True)app.py+5-4