NCTCMumbai commited on
Commit
26da6ce
·
verified ·
1 Parent(s): 58c6125

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -403,7 +403,10 @@ print(label_info)
403
  classifier = pipeline("zero-shot-classification", model="knowledgator/comprehend_it-base")
404
  client = InferenceClient("huggingchat/pdf-to-markdown")
405
  import os
406
- os.environ["GROQ_API_KEY"] = os.environ.get("GROQ_API_KEY")
 
 
 
407
 
408
 
409
  phi_agent = Agent(
 
403
  classifier = pipeline("zero-shot-classification", model="knowledgator/comprehend_it-base")
404
  client = InferenceClient("huggingchat/pdf-to-markdown")
405
  import os
406
+ groq_api_key = os.environ.get("GROQ_API_KEY")
407
+ if not isinstance(groq_api_key, str):
408
+ raise EnvironmentError("GROQ_API_KEY not found. Please add it to Hugging Face Space secrets.")
409
+ os.environ["GROQ_API_KEY"] = groq_api_key
410
 
411
 
412
  phi_agent = Agent(