girishwangikar commited on
Commit
f710c77
·
verified ·
1 Parent(s): 81e1703

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,12 +7,12 @@ from langchain.prompts import PromptTemplate
7
  import gradio as gr
8
 
9
  # Set up the ChatGroq API
10
- api_key = os.environ.get("GROQ_API_KEY")
11
  if not api_key:
12
  raise ValueError("Please set the GROQ_API_KEY environment variable")
13
 
14
  # Initialize the ChatGroq LLM
15
- llm = ChatGroq(temperature=0, model_name='llama-3.1-8b-instant', groq_api_key=api_key)
16
 
17
  # Define a prompt template for entity extraction
18
  entity_extraction_prompt = PromptTemplate(
 
7
  import gradio as gr
8
 
9
  # Set up the ChatGroq API
10
+ GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
11
  if not api_key:
12
  raise ValueError("Please set the GROQ_API_KEY environment variable")
13
 
14
  # Initialize the ChatGroq LLM
15
+ llm = ChatGroq(temperature=0, model_name='llama-3.1-8b-instant', groq_api_key=GROQ_API_KEY)
16
 
17
  # Define a prompt template for entity extraction
18
  entity_extraction_prompt = PromptTemplate(