qqqwt commited on
Commit
b8d0233
·
1 Parent(s): dbe7e6d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -487,11 +487,8 @@ class Reader:
487
  print(f"Query: {self.query}")
488
  print(f"Sort: {self.sort}")
489
 
490
- def upload_pdf(key, text, file):
491
- text = "'Abstract,Introduction,Related Work,Background,Preliminary,Problem Formulation,Methods,Methodology,Method,Approach,Approaches,Materials and Methods,Experiment Settings,Experiment,Experimental Results,Evaluation,Experiments,Results,Findings,Data Analysis,Discussion,Results and Discussion,Conclusion,References'"
492
- # 检查两个输入都不为空
493
- if not key or not text or not file:
494
- return "两个输入都不能为空,请输入字符并上传 PDF 文件!"
495
  # 判断PDF文件
496
  if file and file.name.split(".")[-1].lower() != "pdf":
497
  return '请勿上传非 PDF 文件!'
 
487
  print(f"Query: {self.query}")
488
  print(f"Sort: {self.sort}")
489
 
490
+ def upload_pdf(key,file):
491
+
 
 
 
492
  # 判断PDF文件
493
  if file and file.name.split(".")[-1].lower() != "pdf":
494
  return '请勿上传非 PDF 文件!'