DrishtiSharma commited on
Commit
1e60279
·
verified ·
1 Parent(s): 45d5a19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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", ["OpenAI Model", "Groq-based LLM"], index=1, horizontal=True)
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 == "Groq-based LLM":
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 == "OpenAI Model":
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