Spaces:
Runtime error
Runtime error
sashavor
commited on
Commit
·
bbb131b
1
Parent(s):
9ca002e
why is this not working
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ st.markdown('You can use this tool to calculate different aspects of your model:
|
|
66 |
|
67 |
st.markdown('### Dynamic Emissions')
|
68 |
with st.expander("Calculate the emissions produced by energy consumption of model training"):
|
69 |
-
with st.form(key='dynamic_emissions'
|
70 |
col1, col2, col3, col4 = st.columns(4)
|
71 |
with col1:
|
72 |
hardware = st.selectbox('GPU used', TDP['name'].tolist())
|
@@ -94,7 +94,7 @@ with st.expander("Calculate the emissions produced by energy consumption of mode
|
|
94 |
st.metric(label="Dynamic emissions", value=str(dynamic_emissions)+' kilograms of CO2eq')
|
95 |
st.markdown('This is roughly equivalent to '+ str(round(dynamic_emissions/kg_per_mile,1)) + ' miles driven in an average US car'
|
96 |
' produced in 2021. [(Source: energy.gov)](https://www.energy.gov/eere/vehicles/articles/fotw-1223-january-31-2022-average-carbon-dioxide-emissions-2021-model-year)')
|
97 |
-
st.form_submit_button(label="
|
98 |
on_click = lambda *args: write_to_csv(hardware, training_time, provider, carbon_intensity, dynamic_emissions))
|
99 |
|
100 |
|
|
|
66 |
|
67 |
st.markdown('### Dynamic Emissions')
|
68 |
with st.expander("Calculate the emissions produced by energy consumption of model training"):
|
69 |
+
with st.form(key='dynamic_emissions'):
|
70 |
col1, col2, col3, col4 = st.columns(4)
|
71 |
with col1:
|
72 |
hardware = st.selectbox('GPU used', TDP['name'].tolist())
|
|
|
94 |
st.metric(label="Dynamic emissions", value=str(dynamic_emissions)+' kilograms of CO2eq')
|
95 |
st.markdown('This is roughly equivalent to '+ str(round(dynamic_emissions/kg_per_mile,1)) + ' miles driven in an average US car'
|
96 |
' produced in 2021. [(Source: energy.gov)](https://www.energy.gov/eere/vehicles/articles/fotw-1223-january-31-2022-average-carbon-dioxide-emissions-2021-model-year)')
|
97 |
+
st.form_submit_button(label="Anonymously share my data", help="Share the data from your model anonymously for research purposes!",\
|
98 |
on_click = lambda *args: write_to_csv(hardware, training_time, provider, carbon_intensity, dynamic_emissions))
|
99 |
|
100 |
|