elshehawy commited on
Commit
eee4c3e
·
1 Parent(s): cc01c8c

fix return statement

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -73,7 +73,8 @@ def predict(query, pdf_file):
73
 
74
  # pdf_paths = load_pdf_paths(data_root)
75
  rag_chain = build_rag_chain([pdf_file])
76
- return rag_chain.invoke(query)
 
77
 
78
  # examples = [
79
  # "هل هناك غرامة للتخلف عن سداد ضريبة القيمة المضافة؟",
 
73
 
74
  # pdf_paths = load_pdf_paths(data_root)
75
  rag_chain = build_rag_chain([pdf_file])
76
+ return rag_chain.invoke(query)
77
+ return "Please upload PDF file"
78
 
79
  # examples = [
80
  # "هل هناك غرامة للتخلف عن سداد ضريبة القيمة المضافة؟",