ilyassh commited on
Commit
2f84176
·
verified ·
1 Parent(s): 7a509e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -63,7 +63,7 @@ def chat(user_input, history):
63
  explanation_messages = [
64
  {
65
  "role": "system",
66
- "content": "You are a Python language guide. Provide a concise explanation on how to approach the following mathematical task without calculating the answer."
67
  },
68
  {
69
  "role": "user",
@@ -73,7 +73,7 @@ def chat(user_input, history):
73
  explanation = llm_inference(explanation_messages)
74
 
75
  # Step 2: Generate Python Code using Explanation and User Prompt
76
- code_prompt = f"Based on the following explanation, write a Python program to solve the mathematical task. Ensure that the program includes a print statement to output the answer.\n\nExplanation: {explanation}\n\nTask: {user_input}"
77
 
78
  code_messages = [
79
  {
 
63
  explanation_messages = [
64
  {
65
  "role": "system",
66
+ "content": "Provide a very small explanation on how to approach the following mathematical task without calculating the answer."
67
  },
68
  {
69
  "role": "user",
 
73
  explanation = llm_inference(explanation_messages)
74
 
75
  # Step 2: Generate Python Code using Explanation and User Prompt
76
+ code_prompt = f"Based on the following explanation, write a Python program to solve the mathematical task using Python. Ensure that the program includes a print statement to output the answer. Write only code. Writing any comments or anything else is prohibited. \n\nExplanation: {explanation}\n\nTask: {user_input}"
77
 
78
  code_messages = [
79
  {