Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,15 +15,7 @@ def generate_question(role, topic, difficulty_level):
|
|
| 15 |
response = llm.invoke(prompt)
|
| 16 |
response = response.content
|
| 17 |
return response
|
| 18 |
-
|
| 19 |
-
# llm_chain = prompt | llm
|
| 20 |
-
# # prompt = PromptTemplate.from_template(prompt)
|
| 21 |
-
# # llm_chain = prompt | llm
|
| 22 |
-
# response = llm_chain.invoke(prompt)
|
| 23 |
-
# llm_chain.invoke({"question": question})
|
| 24 |
-
# response = response.content
|
| 25 |
-
|
| 26 |
-
# return response
|
| 27 |
|
| 28 |
def evaluate_answer(question, user_answer):
|
| 29 |
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 |
response = llm.invoke(prompt)
|
| 16 |
response = response.content
|
| 17 |
return response
|
| 18 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
def evaluate_answer(question, user_answer):
|
| 21 |
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."
|