Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
yrobel-lima
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,16 @@ import openai
|
|
5 |
from openai import OpenAI, OpenAIError
|
6 |
import streamlit as st
|
7 |
from langchain_core.messages import AIMessage, HumanMessage
|
8 |
-
from utils.error_message_template import
|
9 |
|
10 |
try:
|
11 |
from rag.runnable_and_memory import get_runnable_and_memory
|
12 |
except OpenAIError:
|
13 |
handle_errors()
|
14 |
st.stop()
|
|
|
|
|
|
|
15 |
|
16 |
logging.basicConfig(level=logging.ERROR)
|
17 |
|
|
|
5 |
from openai import OpenAI, OpenAIError
|
6 |
import streamlit as st
|
7 |
from langchain_core.messages import AIMessage, HumanMessage
|
8 |
+
from utils.error_message_template import handle_errors
|
9 |
|
10 |
try:
|
11 |
from rag.runnable_and_memory import get_runnable_and_memory
|
12 |
except OpenAIError:
|
13 |
handle_errors()
|
14 |
st.stop()
|
15 |
+
except Exception:
|
16 |
+
handle_errors()
|
17 |
+
st.stop()
|
18 |
|
19 |
logging.basicConfig(level=logging.ERROR)
|
20 |
|