Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
import os
|
2 |
import streamlit as st
|
3 |
from groq import Groq
|
|
|
|
|
|
|
|
|
4 |
|
5 |
# Set up Groq client with API key
|
6 |
client = Groq(
|
7 |
-
api_key=os.
|
8 |
)
|
9 |
|
10 |
# Streamlit UI
|
@@ -36,4 +40,3 @@ if st.button("Generate CV"):
|
|
36 |
# Displaying the generated CV
|
37 |
cv_content = chat_completion.choices[0].message.content
|
38 |
st.write(cv_content)
|
39 |
-
|
|
|
1 |
import os
|
2 |
import streamlit as st
|
3 |
from groq import Groq
|
4 |
+
from dotenv import load_dotenv
|
5 |
+
|
6 |
+
# Load environment variables from .env file
|
7 |
+
load_dotenv()
|
8 |
|
9 |
# Set up Groq client with API key
|
10 |
client = Groq(
|
11 |
+
api_key=os.getenv("GROQ_API_KEY"),
|
12 |
)
|
13 |
|
14 |
# Streamlit UI
|
|
|
40 |
# Displaying the generated CV
|
41 |
cv_content = chat_completion.choices[0].message.content
|
42 |
st.write(cv_content)
|
|