Lovish Singla commited on
Commit
35601a1
·
unverified ·
1 Parent(s): 05c3efb

Add files via upload

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -50,7 +50,11 @@ Please refine the current summary to include the new information while maintaini
50
  refinement_prompt = PromptTemplate(template=refinement_prompt_template, input_variables=["existing_answer", "text"])
51
 
52
  # Initialize LLM with Groq API Key
53
- llm = ChatGroq(model="gemma2-9b-it", groq_api_key=groq_api_key)
 
 
 
 
54
 
55
  # Button to Summarize Content
56
  if st.button("Summarize the Content"):
 
50
  refinement_prompt = PromptTemplate(template=refinement_prompt_template, input_variables=["existing_answer", "text"])
51
 
52
  # Initialize LLM with Groq API Key
53
+ if groq_api_key:
54
+ try:
55
+ llm = ChatGroq(model="gemma2-9b-it", groq_api_key=groq_api_key)
56
+ except Exception as e:
57
+ st.error(f"Failed to initialize Groq client: {e}")
58
 
59
  # Button to Summarize Content
60
  if st.button("Summarize the Content"):