captain-awesome commited on
Commit
1d47724
·
verified ·
1 Parent(s): 4119894

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -51,10 +51,14 @@ def main():
51
 
52
 
53
  # Initialize Groq Langchain chat object and conversation
54
- groq_chat = ChatGroq(
55
- groq_api_key=groq_api_key,
56
- model_name=model
57
- )
 
 
 
 
58
 
59
  conversation = ConversationChain(
60
  llm=groq_chat,
 
51
 
52
 
53
  # Initialize Groq Langchain chat object and conversation
54
+ if groq_api_key:
55
+ groq_chat = ChatGroq(
56
+ groq_api_key=groq_api_key,
57
+ model_name=model
58
+ )
59
+ else:
60
+ st.text_input("Please enter your Groq API key")
61
+
62
 
63
  conversation = ConversationChain(
64
  llm=groq_chat,