put dotenv import in try block
Browse files
app.py
CHANGED
@@ -2,12 +2,17 @@ import os
|
|
2 |
|
3 |
import requests
|
4 |
import streamlit as st
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
from responses import SubmitQuestionAndDocumentsResponse
|
8 |
|
9 |
st.set_page_config(layout="wide")
|
10 |
-
load_dotenv()
|
11 |
|
12 |
if os.getenv("ENV") == "production":
|
13 |
BASE_URL = "https://deven-cleric-backend.onrender.com"
|
|
|
2 |
|
3 |
import requests
|
4 |
import streamlit as st
|
5 |
+
|
6 |
+
try:
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
load_dotenv()
|
9 |
+
except ImportError:
|
10 |
+
pass
|
11 |
+
|
12 |
|
13 |
from responses import SubmitQuestionAndDocumentsResponse
|
14 |
|
15 |
st.set_page_config(layout="wide")
|
|
|
16 |
|
17 |
if os.getenv("ENV") == "production":
|
18 |
BASE_URL = "https://deven-cleric-backend.onrender.com"
|