Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ llm = None
|
|
30 |
|
31 |
# Model Selection
|
32 |
#st.header("Model Selection")
|
33 |
-
model_choice = st.radio("Select LLM", ["
|
34 |
|
35 |
|
36 |
# API Key Validation and LLM Initialization
|
@@ -39,13 +39,13 @@ openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
39 |
|
40 |
#llm = ChatGroq(groq_api_key=os.getenv("GROQ_API_KEY"), model="groq/llama-3.3-70b-versatile")
|
41 |
|
42 |
-
if model_choice == "
|
43 |
if not groq_api_key:
|
44 |
st.error("Groq API key is missing. Please set the GROQ_API_KEY environment variable.")
|
45 |
llm = None
|
46 |
else:
|
47 |
llm = ChatGroq(groq_api_key=groq_api_key, model="groq/llama-3.3-70b-versatile")
|
48 |
-
elif model_choice == "
|
49 |
if not openai_api_key:
|
50 |
st.error("OpenAI API key is missing. Please set the OPENAI_API_KEY environment variable.")
|
51 |
llm = None
|
|
|
30 |
|
31 |
# Model Selection
|
32 |
#st.header("Model Selection")
|
33 |
+
model_choice = st.radio("Select LLM", ["GPT-4o", "llama-3.3-70b"], index=1, horizontal=True)
|
34 |
|
35 |
|
36 |
# API Key Validation and LLM Initialization
|
|
|
39 |
|
40 |
#llm = ChatGroq(groq_api_key=os.getenv("GROQ_API_KEY"), model="groq/llama-3.3-70b-versatile")
|
41 |
|
42 |
+
if model_choice == "llama-3.3-70b":
|
43 |
if not groq_api_key:
|
44 |
st.error("Groq API key is missing. Please set the GROQ_API_KEY environment variable.")
|
45 |
llm = None
|
46 |
else:
|
47 |
llm = ChatGroq(groq_api_key=groq_api_key, model="groq/llama-3.3-70b-versatile")
|
48 |
+
elif model_choice == "GPT-4o":
|
49 |
if not openai_api_key:
|
50 |
st.error("OpenAI API key is missing. Please set the OPENAI_API_KEY environment variable.")
|
51 |
llm = None
|