Spaces:
Sleeping
Sleeping
firqaaa
commited on
Commit
·
99f2f2f
1
Parent(s):
6a2bc28
add app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ from ast import literal_eval
|
|
23 |
|
24 |
nltk.download('punkt')
|
25 |
|
26 |
-
os.environ['OPENAI_API_KEY'] = "sk-
|
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
|
234 |
-
|
235 |
-
st.write("Sorry, we are experiencing difficulties in extracting the information. Please try again with different context length.")
|
236 |
# st.write(e)
|
237 |
-
|
238 |
-
|
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.")
|
|