Nimzi commited on
Commit
fc0aaaa
·
verified ·
1 Parent(s): 55e8457

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -9,9 +9,11 @@ from transformers import pipeline
9
  from groq import Groq
10
  from openai import OpenAI
11
 
12
- # Set up the Groq client
13
- import os
14
- client = Groq(api_key=os.getenv("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"))
 
 
15
 
16
  # Load a fake news detection model from Hugging Face
17
  fake_news_pipeline = pipeline("text-classification", model="mrm8488/bert-tiny-finetuned-fake-news-detection")
 
9
  from groq import Groq
10
  from openai import OpenAI
11
 
12
+ # Load Environment variables
13
+ GROQ_API_KEY = os.getenv ("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")
14
+
15
+ # Initialize groq client
16
+ client = Groq(api_key=GROQ_API_KEY)
17
 
18
  # Load a fake news detection model from Hugging Face
19
  fake_news_pipeline = pipeline("text-classification", model="mrm8488/bert-tiny-finetuned-fake-news-detection")