Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,13 @@ def find_hackernews_posts(message,history):
|
|
42 |
)
|
43 |
|
44 |
result = crew.kickoff()
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
chat_interface = gr.ChatInterface(
|
48 |
fn=find_hackernews_posts,
|
|
|
42 |
)
|
43 |
|
44 |
result = crew.kickoff()
|
45 |
+
formatted_result = "Here are some relevant Hacker News posts:\n\n"
|
46 |
+
for post in result.__str__.split('\n'):
|
47 |
+
if post.strip():
|
48 |
+
formatted_result += f"• {post.strip()}\n"
|
49 |
+
|
50 |
+
# Return the result in the format expected by the Chatbot component
|
51 |
+
return [(message, formatted_result)]
|
52 |
|
53 |
chat_interface = gr.ChatInterface(
|
54 |
fn=find_hackernews_posts,
|