File size: 683 Bytes
675b3d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os, sys, json
from pprint import pprint

import llm


try: filename = sys.argv[1]
except: filename = ".cache/https:/vietnamnet.vn/muc-nuoc-song-cau-o-thai-nguyen-giam-dan-nguoi-dan-tat-bat-don-dep-sau-lu-2321461.html"

clean_view_filename = filename + "__clean_view.txt"

# if not os.path.exists(clean_view_filename):
text_filename = filename + ".txt"

text = open(text_filename, "rt").read()

print(f"Chuẩn bị tạo nội dung cleanview {clean_view_filename}", flush = True)
clean_view = llm.gen_clean_view(text)

with open(clean_view_filename, "wt") as f:
	f.write(clean_view)

print("\n- - - CLEAN VIEW - - -\n")
print(clean_view, flush = True)