Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,16 @@ genai.configure(api_key=GOOGLE_API_KEY)
|
|
| 13 |
# Text input for user prompt
|
| 14 |
user_input = st.text_area("Enter your prompt to generate content:")
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Button to submit the prompt
|
| 17 |
if st.button("Generate"):
|
| 18 |
if user_input:
|
|
@@ -20,7 +30,7 @@ if st.button("Generate"):
|
|
| 20 |
model = genai.GenerativeModel('gemini-pro') # Assuming this is the correct model
|
| 21 |
try:
|
| 22 |
# Generate content based on the user's input
|
| 23 |
-
response = model.generate_content(
|
| 24 |
|
| 25 |
# Display the generated content
|
| 26 |
st.write("Generated Content:")
|
|
|
|
| 13 |
# Text input for user prompt
|
| 14 |
user_input = st.text_area("Enter your prompt to generate content:")
|
| 15 |
|
| 16 |
+
prompt = f"""
|
| 17 |
+
Analyze the following Job Description:
|
| 18 |
+
|
| 19 |
+
1. Extract the top keywords.
|
| 20 |
+
2. Suggest a learning plan based on the skills required.
|
| 21 |
+
3. Provide the top interview questions a candidate might face.
|
| 22 |
+
|
| 23 |
+
Job Description: {user_input}
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
# Button to submit the prompt
|
| 27 |
if st.button("Generate"):
|
| 28 |
if user_input:
|
|
|
|
| 30 |
model = genai.GenerativeModel('gemini-pro') # Assuming this is the correct model
|
| 31 |
try:
|
| 32 |
# Generate content based on the user's input
|
| 33 |
+
response = model.generate_content(prompt)
|
| 34 |
|
| 35 |
# Display the generated content
|
| 36 |
st.write("Generated Content:")
|