Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -247,13 +247,34 @@ def main():
|
|
247 |
search_query = get_search_query(st.session_state['generated'][-1])
|
248 |
retrieved_links = search_url(search_query)
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
|
251 |
if retrieved_links:
|
252 |
st.markdown("**Google Search Results:**")
|
253 |
for j, link in enumerate(retrieved_links):
|
254 |
# Display Google logo
|
255 |
-
st.
|
256 |
-
|
|
|
|
|
|
|
|
|
|
|
257 |
|
258 |
|
259 |
|
|
|
247 |
search_query = get_search_query(st.session_state['generated'][-1])
|
248 |
retrieved_links = search_url(search_query)
|
249 |
|
250 |
+
if retrieved_links is None:
|
251 |
+
retrieved_links = [
|
252 |
+
{"link":"https://www.yieldgap.org/Morocco", "title":"Morocco - Global yield gap atlas"},
|
253 |
+
{"link":"https://www.agriculture.gov.ma/", "title":"Accueil | Ministère de l'agriculture"},
|
254 |
+
{"link":"https://www.agrimaroc.ma/actualite-agricole/", "title":"Morocco - AgriMaroc"},
|
255 |
+
{"link":"https://perspective.usherbrooke.ca/bilan/servlet/BMTendanceStatPays?langue=fr&codePays=MAR&codeTheme=5&codeStat=AG.LND.AGRI.ZS", "title":"Perspective Monde"},
|
256 |
+
]
|
257 |
+
st.markdown("**Google Search Results:**")
|
258 |
+
for j, link in enumerate(retrieved_links):
|
259 |
+
st.markdown(f'<span style="display: inline-block; vertical-align: middle;">'
|
260 |
+
f'<img src="https://companieslogo.com/img/orig/GOOG-0ed88f7c.png" width="15" style="margin-right: 5px;" alt="Logo">'
|
261 |
+
f'{j + 1}. [{link["title"]}]({link["link"]})'
|
262 |
+
f'</span>',
|
263 |
+
unsafe_allow_html=True)
|
264 |
+
# st.image("https://companieslogo.com/img/orig/GOOG-0ed88f7c.png", width=15, caption="")
|
265 |
+
# st.markdown(f"{j + 1}. [{link['title']}]({link['link']})")
|
266 |
|
267 |
if retrieved_links:
|
268 |
st.markdown("**Google Search Results:**")
|
269 |
for j, link in enumerate(retrieved_links):
|
270 |
# Display Google logo
|
271 |
+
st.markdown(f'<span style="display: inline-block; vertical-align: middle;">'
|
272 |
+
f'<img src="https://companieslogo.com/img/orig/GOOG-0ed88f7c.png" width="15" style="margin-right: 5px;" alt="Logo">'
|
273 |
+
f'{j + 1}. [{link["title"]}]({link["link"]})'
|
274 |
+
f'</span>',
|
275 |
+
unsafe_allow_html=True)
|
276 |
+
# st.image("https://companieslogo.com/img/orig/GOOG-0ed88f7c.png", width=15, caption="")
|
277 |
+
# st.markdown(f"{j + 1}. [{link['title']}]({link['link']})")
|
278 |
|
279 |
|
280 |
|