File size: 1,757 Bytes
2d5ffb9
 
 
 
25cf4f2
2d5ffb9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import streamlit as st
from persist import persist, load_widget_state
from pathlib import Path



global variable_output

def main():

    cs_body()


def cs_body():

    stateVariable = 'Model_carbon'
    help_text ='Provide an estimate for the carbon emissions: e.g hardware used, horus spent training, cloud provider '

    st.markdown('# Environmental Impact')
    st.markdown('###### Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).')
    st.text_area("", help="Provide an estimate for the carbon emissions: e.g hardware used, horus spent training, cloud provider")

    left, right = st.columns([2,4])
    with left: 
        st.write("\n")
        st.write("\n")
        st.markdown('### Hardware Type:')
        st.write("\n")
        st.write("\n")
        #st.write("\n")
        st.markdown('### Hours used:')
        st.write("\n")
        st.write("\n")
        st.markdown('### Cloud Provider:')
        st.write("\n")
        st.write("\n")
        st.markdown('### Compute Region:')
        st.write("\n")
        st.write("\n")
        st.markdown('### Carbon Emitted:')
    with right:
        #soutput_jinja = parse_into_jinja_markdown()
        st.text_input("",key=persist("Model_hardware"))
        #st.write("\n")
        st.text_input("",help="sw",key=persist("hours_used"))
        st.text_input("",key=persist("Model_cloud_provider"))
        st.text_input("",key=persist("Model_cloud_region"))
        st.text_input("",help= 'in grams of CO2eq', key=persist("Model_c02_emitted")) ##to-do: auto calculate 
    
   
    
    

if __name__ == '__main__':
    load_widget_state()
    main()