Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -130,33 +130,20 @@ def main():
|
|
130 |
st.error("Sorry! Couldn't process the request")
|
131 |
|
132 |
st.header("Latest Covid News")
|
133 |
-
col1, col2= st.beta_columns([4,4])
|
134 |
latest_news = news()
|
135 |
-
for i in latest_news[0:
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
elif i in [1, 3, 5]:
|
149 |
-
with col2:
|
150 |
-
st.write(i['title'])
|
151 |
-
st.image(
|
152 |
-
i['img'],
|
153 |
-
width=100, # Manually Adjust the width of the image as per requirement
|
154 |
-
)
|
155 |
-
link_ = i['link']
|
156 |
-
link_ = link_.replace("news.google.com/.", "https://news.google.com")
|
157 |
-
link_path = "read this [article]" + "(" + link_ + ")"
|
158 |
-
st.write(link_path)
|
159 |
-
st.write(" ")
|
160 |
|
161 |
if __name__ == "__main__":
|
162 |
main()
|
|
|
130 |
st.error("Sorry! Couldn't process the request")
|
131 |
|
132 |
st.header("Latest Covid News")
|
|
|
133 |
latest_news = news()
|
134 |
+
for i in latest_news[0:5]:
|
135 |
+
with col1:
|
136 |
+
st.write(i['title'])
|
137 |
+
st.image(
|
138 |
+
i['img'],
|
139 |
+
width=100, # Manually Adjust the width of the image as per requirement
|
140 |
+
)
|
141 |
+
link_ = i['link']
|
142 |
+
link_ = link_.replace("news.google.com/.", "https://news.google.com")
|
143 |
+
link_path = "read this [article]" + "(" + link_ + ")"
|
144 |
+
st.write(link_path)
|
145 |
+
st.write(" ")
|
146 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
if __name__ == "__main__":
|
149 |
main()
|