Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,24 +33,20 @@ def get_stock_information(stock:str) -> str:
|
|
| 33 |
return '\n'.join([f'{ky} of {stock} is {info1[ky]}' for ky in info1.keys()])
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error fetching stock info '{stock}': {str(e)}"
|
| 36 |
-
|
| 37 |
|
| 38 |
@tool
|
| 39 |
def get_radion_str(country:str)->str:
|
| 40 |
''' this function fetches streams to radio stations for country
|
| 41 |
-
|
| 42 |
Args:
|
| 43 |
country:A string representing a valid country (e.g., 'us')
|
| 44 |
-
Return: str
|
| 45 |
-
|
| 46 |
-
ex: get_radion_str('us')
|
| 47 |
-
|
| 48 |
'''
|
| 49 |
try:
|
| 50 |
conn = http.client.HTTPSConnection("50k-radio-stations.p.rapidapi.com")
|
| 51 |
|
| 52 |
headers = {
|
| 53 |
-
"x-rapidapi-key": "
|
| 54 |
"x-rapidapi-host": "50k-radio-stations.p.rapidapi.com",
|
| 55 |
}
|
| 56 |
|
|
|
|
| 33 |
return '\n'.join([f'{ky} of {stock} is {info1[ky]}' for ky in info1.keys()])
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error fetching stock info '{stock}': {str(e)}"
|
| 36 |
+
|
| 37 |
|
| 38 |
@tool
|
| 39 |
def get_radion_str(country:str)->str:
|
| 40 |
''' this function fetches streams to radio stations for country
|
|
|
|
| 41 |
Args:
|
| 42 |
country:A string representing a valid country (e.g., 'us')
|
| 43 |
+
Return: str
|
|
|
|
|
|
|
|
|
|
| 44 |
'''
|
| 45 |
try:
|
| 46 |
conn = http.client.HTTPSConnection("50k-radio-stations.p.rapidapi.com")
|
| 47 |
|
| 48 |
headers = {
|
| 49 |
+
"x-rapidapi-key": "edb18a5d52msh741fb6d677c3be2p1c3c92jsn41ac9a131361",
|
| 50 |
"x-rapidapi-host": "50k-radio-stations.p.rapidapi.com",
|
| 51 |
}
|
| 52 |
|