linjieccc commited on
Commit
e41e3f2
1 Parent(s): f0d6709

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -228,7 +228,7 @@ def np2base64(image_np):
228
 
229
 
230
  def img2base64(path):
231
- if path.endswith:
232
  base64_str = np2base64(load_document(path)[0])
233
  else:
234
  base64_str = base64.b64encode(open(path, 'rb').read()).decode()
 
228
 
229
 
230
  def img2base64(path):
231
+ if path.endswith(".pdf"):
232
  base64_str = np2base64(load_document(path)[0])
233
  else:
234
  base64_str = base64.b64encode(open(path, 'rb').read()).decode()