Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,18 @@ import urllib.request
|
|
11 |
import uuid
|
12 |
main_directory = "https://services.swpc.noaa.gov/"
|
13 |
|
14 |
-
|
15 |
-
nasa_soho_images=[
|
16 |
{"name":"EIT 304A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_304small.gif"},
|
17 |
{"name":"EIT 195A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_195small.gif"},
|
18 |
{"name":"EIT 171A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_171small.gif"},
|
19 |
{"name":"EIT 284A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_284small.gif"},
|
20 |
]
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
|
@@ -56,6 +60,7 @@ css="""
|
|
56 |
display: flex;
|
57 |
flex-direction: row;
|
58 |
flex-wrap: wrap;
|
|
|
59 |
}
|
60 |
.img_class_soho{
|
61 |
background: #ffffff;
|
@@ -172,9 +177,14 @@ def make_html(inp_files):
|
|
172 |
|
173 |
def make_nasa_soho():
|
174 |
html_out=f"<style>{css}</style><div class='img_box_soho'>"
|
175 |
-
for ea in
|
176 |
file_name=ea['source']
|
177 |
-
html_out+=f'
|
|
|
|
|
|
|
|
|
|
|
178 |
html_out+='</div>'
|
179 |
return html_out
|
180 |
|
|
|
11 |
import uuid
|
12 |
main_directory = "https://services.swpc.noaa.gov/"
|
13 |
|
14 |
+
nasa_soho_gifs=[
|
|
|
15 |
{"name":"EIT 304A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_304small.gif"},
|
16 |
{"name":"EIT 195A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_195small.gif"},
|
17 |
{"name":"EIT 171A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_171small.gif"},
|
18 |
{"name":"EIT 284A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_284small.gif"},
|
19 |
]
|
20 |
+
nasa_soho_mp4=[
|
21 |
+
{"name":"EIT 171A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_171small.mp4"},
|
22 |
+
{"name":"EIT 195A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_195small.mp4"},
|
23 |
+
{"name":"EIT 284A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_284small.mp4"},
|
24 |
+
{"name":"EIT 304A", "source":"https://soho.nascom.nasa.gov/data/LATEST/current_eit_304small.mp4"},
|
25 |
+
]
|
26 |
|
27 |
|
28 |
|
|
|
60 |
display: flex;
|
61 |
flex-direction: row;
|
62 |
flex-wrap: wrap;
|
63 |
+
justify-content: space-between;
|
64 |
}
|
65 |
.img_class_soho{
|
66 |
background: #ffffff;
|
|
|
177 |
|
178 |
def make_nasa_soho():
|
179 |
html_out=f"<style>{css}</style><div class='img_box_soho'>"
|
180 |
+
for ea in nasa_soho_mp4:
|
181 |
file_name=ea['source']
|
182 |
+
html_out+=f'''
|
183 |
+
<video width="320" height="320" controls>
|
184 |
+
<source src="{file_name}" type="video/mp4">
|
185 |
+
Your browser does not support the video tag.
|
186 |
+
</video>'''
|
187 |
+
#html_out+=f'<div class="img_class_soho"><img src="file={file_name}"></div>'
|
188 |
html_out+='</div>'
|
189 |
return html_out
|
190 |
|