lozanopastor commited on
Commit
38a0374
·
verified ·
1 Parent(s): 0a89103

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -74,7 +74,8 @@ def user_input(user_question):
74
  )
75
 
76
  # Debugging: Print the original response
77
- print("Original Response:", response['output_text'])
 
78
 
79
  # Extract the thought process
80
  thought_process = ""
@@ -84,7 +85,7 @@ def user_input(user_question):
84
  thought_process = thought_process_match.group(1).strip()
85
 
86
  # Remove the thought process from the main response
87
- clean_response = response['output_text'].replace(f"<think>{thought_process}</think>", "").strip()
88
 
89
  # Debugging: Print the cleaned response
90
  print("Cleaned Response:", clean_response)
 
74
  )
75
 
76
  # Debugging: Print the original response
77
+ original_response = response['output_text']
78
+ print("Original Response:", original_response)
79
 
80
  # Extract the thought process
81
  thought_process = ""
 
85
  thought_process = thought_process_match.group(1).strip()
86
 
87
  # Remove the thought process from the main response
88
+ clean_response = original_response.split("<think>")[-1].split("</think>")[0]
89
 
90
  # Debugging: Print the cleaned response
91
  print("Cleaned Response:", clean_response)