Spaces:
Sleeping
Sleeping
SHAMIL SHAHBAZ AWAN
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def current_space_news():
|
|
| 50 |
|
| 51 |
# Format the top 3 space news articles
|
| 52 |
formatted_news = "\n\n".join(
|
| 53 |
-
[f"π° **{article.get('title', 'Untitled')}**\nπ [Read More]({article.get('url', '#'
|
| 54 |
)
|
| 55 |
|
| 56 |
return {"output": f"π **Latest Space News:**\n\n{formatted_news}"}
|
|
@@ -58,7 +58,6 @@ def current_space_news():
|
|
| 58 |
except Exception as e:
|
| 59 |
return {"output": f"π **Space News Update:** Unable to fetch news. Error: {str(e)}"}
|
| 60 |
|
| 61 |
-
|
| 62 |
def astronomy_image_agent(user_input: str):
|
| 63 |
"""
|
| 64 |
Retrieves astronomy-related images from NASA's Image and Video Library or the Astronomy Picture of the Day (APOD) API.
|
|
|
|
| 50 |
|
| 51 |
# Format the top 3 space news articles
|
| 52 |
formatted_news = "\n\n".join(
|
| 53 |
+
[f"π° **{article.get('title', 'Untitled')}**\nπ [Read More]({article.get('url', '#'}) )" for article in news_results[:3]]
|
| 54 |
)
|
| 55 |
|
| 56 |
return {"output": f"π **Latest Space News:**\n\n{formatted_news}"}
|
|
|
|
| 58 |
except Exception as e:
|
| 59 |
return {"output": f"π **Space News Update:** Unable to fetch news. Error: {str(e)}"}
|
| 60 |
|
|
|
|
| 61 |
def astronomy_image_agent(user_input: str):
|
| 62 |
"""
|
| 63 |
Retrieves astronomy-related images from NASA's Image and Video Library or the Astronomy Picture of the Day (APOD) API.
|