firqaaa commited on
Commit
99f2f2f
·
1 Parent(s): 6a2bc28

add app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -23,7 +23,7 @@ from ast import literal_eval
23
 
24
  nltk.download('punkt')
25
 
26
- os.environ['OPENAI_API_KEY'] = "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"
27
  Entrez.email = "[email protected]"
28
  Entrez.api_key = "3d7a71231fe7f2d2bd7599e022535199a908"
29
 
@@ -230,10 +230,8 @@ if uploaded_file:
230
  mime='text/csv'
231
  )
232
 
233
- except Exception as e:
234
- if e == json.JSONDecodeError:
235
- st.write("Sorry, we are experiencing difficulties in extracting the information. Please try again with different context length.")
236
  # st.write(e)
237
- else:
238
- st.write("Sorry, we are experiencing difficulties in extracting the information. Please ensure that you input an uncorrupted file.")
239
- # move_file(pdf, "./unprocessed")
 
23
 
24
  nltk.download('punkt')
25
 
26
+ os.environ['OPENAI_API_KEY'] = "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"
27
  Entrez.email = "[email protected]"
28
  Entrez.api_key = "3d7a71231fe7f2d2bd7599e022535199a908"
29
 
 
230
  mime='text/csv'
231
  )
232
 
233
+ except json.JSONDecodeError:
234
+ st.write("Sorry, we are experiencing difficulties in extracting the information. Please try again with different context length.")
 
235
  # st.write(e)
236
+ except:
237
+ st.write("Sorry, we are experiencing difficulties in extracting the information. Please ensure that you input an uncorrupted file.")