Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import re
|
|
| 4 |
|
| 5 |
def generate_question(role, topic, difficulty_level):
|
| 6 |
prompt = f"Generate an interview question for the role of {role} on the topic of {topic} with difficulty level {difficulty_level}."
|
| 7 |
-
llm = ChatGoogleGenerativeAI(model="gemini-2.
|
| 8 |
response = llm.invoke(prompt)
|
| 9 |
response = response.content
|
| 10 |
|
|
@@ -12,7 +12,7 @@ def generate_question(role, topic, difficulty_level):
|
|
| 12 |
|
| 13 |
def evaluate_answer(question, user_answer):
|
| 14 |
prompt = f"Question: {question}\nUser's Answer: {user_answer}\nEvaluate the answer, give a score out of 100, and provide feedback. Also, provide the best possible answer."
|
| 15 |
-
llm = ChatGoogleGenerativeAI(model="gemini-2.
|
| 16 |
response = llm.invoke(prompt)
|
| 17 |
|
| 18 |
evaluation = response.content
|
|
|
|
| 4 |
|
| 5 |
def generate_question(role, topic, difficulty_level):
|
| 6 |
prompt = f"Generate an interview question for the role of {role} on the topic of {topic} with difficulty level {difficulty_level}."
|
| 7 |
+
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash-lite", google_api_key=st.secrets["GOOGLE_API_KEY"])
|
| 8 |
response = llm.invoke(prompt)
|
| 9 |
response = response.content
|
| 10 |
|
|
|
|
| 12 |
|
| 13 |
def evaluate_answer(question, user_answer):
|
| 14 |
prompt = f"Question: {question}\nUser's Answer: {user_answer}\nEvaluate the answer, give a score out of 100, and provide feedback. Also, provide the best possible answer."
|
| 15 |
+
llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash-lite", google_api_key=st.secrets["GOOGLE_API_KEY"])
|
| 16 |
response = llm.invoke(prompt)
|
| 17 |
|
| 18 |
evaluation = response.content
|