Sandiago21 commited on
Commit
5f0756e
·
verified ·
1 Parent(s): 18da617

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -30,7 +30,6 @@ from youtube_transcript_api import YouTubeTranscriptApi
30
  # from langchain.agents import create_tool_calling_agent
31
 
32
 
33
-
34
  # (Keep Constants as is)
35
  # --- Constants ---
36
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
@@ -1049,7 +1048,7 @@ class BasicAgent:
1049
  if "answer: " in response["information"]:
1050
  response["output"] = response["information"].split("answer: ")[-1].strip()
1051
 
1052
- if response["output"] in self.letters_to_number_mapping:
1053
  response["output"] = self.letters_to_number_mapping[response["output"]]
1054
 
1055
  agent_answer = response["output"]
 
30
  # from langchain.agents import create_tool_calling_agent
31
 
32
 
 
33
  # (Keep Constants as is)
34
  # --- Constants ---
35
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
 
1048
  if "answer: " in response["information"]:
1049
  response["output"] = response["information"].split("answer: ")[-1].strip()
1050
 
1051
+ if response["output"].strip() in self.letters_to_number_mapping:
1052
  response["output"] = self.letters_to_number_mapping[response["output"]]
1053
 
1054
  agent_answer = response["output"]