Spaces:
Sleeping
Sleeping
samlonka
commited on
Commit
•
6ad6433
1
Parent(s):
2b900da
''
Browse files
Tools.py
CHANGED
@@ -72,6 +72,7 @@ class MantraToolSpec(BaseToolSpec):
|
|
72 |
def _get_mantra_details(self, query):
|
73 |
try:
|
74 |
details = get_details_mantra_json(query)
|
|
|
75 |
return details['mantraHeader']['language'][1]
|
76 |
except Exception as e:
|
77 |
raise ValueError(f"Failed to get mantra details: {e}")
|
@@ -79,6 +80,7 @@ class MantraToolSpec(BaseToolSpec):
|
|
79 |
def _query_db(self, conditions):
|
80 |
try:
|
81 |
result = self.df_vedamantra[conditions]['mantra_number'].values
|
|
|
82 |
if len(result) == 0:
|
83 |
raise ValueError("Mantra not found.")
|
84 |
return result[0]
|
|
|
72 |
def _get_mantra_details(self, query):
|
73 |
try:
|
74 |
details = get_details_mantra_json(query)
|
75 |
+
print(f"The details of the vedamantra are: {details}")
|
76 |
return details['mantraHeader']['language'][1]
|
77 |
except Exception as e:
|
78 |
raise ValueError(f"Failed to get mantra details: {e}")
|
|
|
80 |
def _query_db(self, conditions):
|
81 |
try:
|
82 |
result = self.df_vedamantra[conditions]['mantra_number'].values
|
83 |
+
print(f"The result of vedamatra are: {result}")
|
84 |
if len(result) == 0:
|
85 |
raise ValueError("Mantra not found.")
|
86 |
return result[0]
|