Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,7 @@ st.write("Analyze datasets using natural language queries.")
|
|
32 |
# Initialize LLM
|
33 |
llm = None
|
34 |
|
|
|
35 |
# Model Selection
|
36 |
model_choice = st.radio("Select LLM", ["GPT-4o", "llama-3.3-70b"], index=0, horizontal=True)
|
37 |
|
@@ -52,6 +53,9 @@ elif model_choice == "GPT-4o":
|
|
52 |
else:
|
53 |
llm = ChatOpenAI(api_key=openai_api_key, model="gpt-4o")
|
54 |
|
|
|
|
|
|
|
55 |
# Initialize session state for data persistence
|
56 |
if "df" not in st.session_state:
|
57 |
st.session_state.df = None
|
|
|
32 |
# Initialize LLM
|
33 |
llm = None
|
34 |
|
35 |
+
|
36 |
# Model Selection
|
37 |
model_choice = st.radio("Select LLM", ["GPT-4o", "llama-3.3-70b"], index=0, horizontal=True)
|
38 |
|
|
|
53 |
else:
|
54 |
llm = ChatOpenAI(api_key=openai_api_key, model="gpt-4o")
|
55 |
|
56 |
+
if llm is None:
|
57 |
+
st.error("β LLM is not initialized. Please check your API keys and model selection.")
|
58 |
+
|
59 |
# Initialize session state for data persistence
|
60 |
if "df" not in st.session_state:
|
61 |
st.session_state.df = None
|