Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,11 @@ def fetch_response(query):
|
|
27 |
|
28 |
def display_sources(sources):
|
29 |
if sources:
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
st.markdown(f"- **{domain}**: [{source['title']}]({source['link']})", unsafe_allow_html=True)
|
36 |
else:
|
37 |
st.write("No sources available.")
|
38 |
|
|
|
27 |
|
28 |
def display_sources(sources):
|
29 |
if sources:
|
30 |
+
for source in sources:
|
31 |
+
# Parse the domain from the URL
|
32 |
+
domain = urlparse(source['link']).netloc
|
33 |
+
# Format and display the domain and title
|
34 |
+
st.markdown(f"- **{domain}**: [{source['title']}]({source['link']})", unsafe_allow_html=True)
|
|
|
35 |
else:
|
36 |
st.write("No sources available.")
|
37 |
|