regraded01 commited on
Commit
23d0f06
1 Parent(s): 2267014

include new secret

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,8 +3,10 @@ import requests
3
  import re
4
  from pdfParser import get_pdf_text
5
 
6
- api_key = st.secrets.hf_credentials.hf_api
7
-
 
 
8
  model_id = "meta-llama/Llama-2-13b-chat-hf"
9
  system_message = """
10
  Your role is to take PDF documents and extract their raw text into a table format that can be uploaded into a database.
 
3
  import re
4
  from pdfParser import get_pdf_text
5
 
6
+ try:
7
+ api_key = st.secrets.hf_credentials.hf_api
8
+ except:
9
+ api_key = st.secrets.hf_api
10
  model_id = "meta-llama/Llama-2-13b-chat-hf"
11
  system_message = """
12
  Your role is to take PDF documents and extract their raw text into a table format that can be uploaded into a database.