VietCat commited on
Commit
29182c9
·
1 Parent(s): 0524087

reduce processing time

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -34,8 +34,9 @@ async def summarize(req: Request, body: SummarizeRequest):
34
  # Tiền xử lý: nếu không giống tin tức thì thêm "Tin nhanh:"
35
  if not text.lower().startswith(("theo", "trong khi", "bộ", "ngày", "việt nam", "công an")):
36
  text = "Tin nhanh: " + text
37
- else
38
- text = "Vietnews: " + text
 
39
 
40
  input_text = text + " </s>"
41
  encoding = tokenizer(input_text, return_tensors="pt")
 
34
  # Tiền xử lý: nếu không giống tin tức thì thêm "Tin nhanh:"
35
  if not text.lower().startswith(("theo", "trong khi", "bộ", "ngày", "việt nam", "công an")):
36
  text = "Tin nhanh: " + text
37
+ else:
38
+ text = "Vietnews: " + text
39
+
40
 
41
  input_text = text + " </s>"
42
  encoding = tokenizer(input_text, return_tensors="pt")