Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import openai
|
3 |
import langdetect as detect
|
|
|
4 |
|
5 |
|
6 |
# Set up OpenAI API with custom Groq endpoint
|
7 |
-
openai.api_key = "
|
8 |
openai.api_base = "https://api.groq.com/openai/v1"
|
9 |
|
10 |
# Function to get the Groq model's response
|
|
|
1 |
import gradio as gr
|
2 |
import openai
|
3 |
import langdetect as detect
|
4 |
+
import os
|
5 |
|
6 |
|
7 |
# Set up OpenAI API with custom Groq endpoint
|
8 |
+
openai.api_key = os.getenv("PrepBuddy_API_KEY")
|
9 |
openai.api_base = "https://api.groq.com/openai/v1"
|
10 |
|
11 |
# Function to get the Groq model's response
|