heaversm commited on
Commit
1ff8412
1 Parent(s): 7f8181f

initial commit

Browse files
Files changed (2) hide show
  1. README.md +6 -8
  2. app.py +49 -72
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Submit Your Plugin to the Impact Framework
3
- emoji: 🔌➕
4
- colorFrom: blue
5
- colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 4.24.0
8
  app_file: app.py
@@ -10,8 +10,6 @@ pinned: false
10
  license: apache-2.0
11
  ---
12
 
13
- This is a sample form users would have to submit in order to have their plugin listed on the Impact Framework directory. The form is designed to ensure there is clarity about what each plugin does, as well as what input it requires, and what data it outputs.
14
 
15
- The form is designed to make it easy to understand what functional units each data type is listed in, as well as to make it easy to find the sources of data used by the plugin, as well as the assumptions made by each plugin where calculation must be estimated rather than measured.
16
-
17
- In addition, this form aims to identify plugins that might naturally preclude this plugin in a standard pipeline based on the required inputs, as well as compatible plugins that might follow this plugin in a pipeline based on its outputs.
 
1
  ---
2
+ title: Impact Framework Pipeline Builder
3
+ emoji: 🚰
4
+ colorFrom: indigo
5
+ colorTo: blue
6
  sdk: gradio
7
  sdk_version: 4.24.0
8
  app_file: app.py
 
10
  license: apache-2.0
11
  ---
12
 
13
+ This plugin helps you to construct your Impact Framework pipeline through a graphical user interface.
14
 
15
+ Based on your chosen plugin, you can specify the inputs and configurations necessary to plug in to the manifest file, and see a sample of the outputs you will likely receive from each plugin in order to help decide the next step in your measurement process.
 
 
app.py CHANGED
@@ -6,77 +6,54 @@ css = """
6
  }
7
  """
8
 
9
- with gr.Blocks(css=css) as registry_submit:
10
- gr.Markdown("# 🔌 Impact Framework Plugin Registry Submission")
11
- gr.Markdown("Fill out the form below to submit your plugin to the Impact Framework Registry")
12
-
13
- with gr.Accordion("Plugin Details",open=True,elem_classes=["plugin-accordion"]):
14
- plugin_name = gr.Textbox(placeholder="What is the name of your plugin?", label="Plugin Name")
15
- plugin_description = gr.Textbox(placeholder="What does your plugin do?", label="Plugin Description",lines=3)
16
- plugin_url = gr.Textbox(placeholder="https://[your_website.com]", label="Plugin URL", info="Enter the URL where more info can be found about your plugin")
17
- plugin_info = gr.Textbox(placeholder="Add any additional info we should know about your plugin", label="Plugin Info",lines=3)
18
-
19
- with gr.Accordion("Plugin Inputs",open=True,elem_classes=["plugin-accordion"]):
20
- gr.Markdown("This is where you put the data your plugin requires")
21
-
22
- with gr.Row(elem_classes=["input-row"],variant="panel"):
23
- plugin_input_1 = gr.Textbox(placeholder="Input name", label="Input Name", info="What is the name of the input?",scale=2)
24
- plugin_input_1_type = gr.Dropdown(["Text", "Number", "Boolean"], label="Input Type",value="Text",interactive=True,info="What data type does your input expect",scale=2)
25
- plugin_input_1_units = gr.Textbox(placeholder="Watts, Lbs CO2e, etc", label="Units", info="What units of measurement does the input expect?",scale=2)
26
- plugin_input_1_required = gr.Checkbox(label="Required", value=False,scale=1)
27
-
28
- with gr.Row(elem_classes=["input-row"]):
29
- plugin_add_input = gr.Button("Add Input")
30
-
31
- with gr.Accordion("Plugin Outputs",open=True,elem_classes=["plugin-accordion"]):
32
- gr.Markdown("This is the data your plugin will return")
33
-
34
- with gr.Row(elem_classes=["output-row"],variant="panel"):
35
- plugin_output_1 = gr.Textbox(placeholder="Output name", label="Output Name", info="What is the name of the output?")
36
- plugin_output_1_type = gr.Dropdown(["Text", "Number", "Boolean"], label="Output Type",value="Text",interactive=True,info="What data type does your output expect")
37
- plugin_output_1_units = gr.Textbox(placeholder="Watts, Lbs CO2e, etc", label="Units", info="What units of measurement does the output expect?")
38
-
39
- with gr.Row(elem_classes=["output-row"]):
40
- plugin_add_output = gr.Button("Add Output")
41
-
42
- with gr.Accordion("Plugin Data",open=True,elem_classes=["plugin-accordion"]):
43
- gr.Markdown("This is where you put information about your plugin's data sources and assumptions")
44
-
45
- with gr.Row(elem_classes=["data-row"],variant="panel"):
46
- with gr.Column():
47
- with gr.Row():
48
- plugin_data_source_1 = gr.Textbox(placeholder="Data source name", label="Data Source Name", info="What is the name of the data source?")
49
- plugin_data_source_1_url = gr.Textbox(placeholder="URL", label="Data Source URL", info="What is the URL of the data source?")
50
- with gr.Row():
51
- plugin_data_source_1_description = gr.Textbox(placeholder="Description / Citation", label="Data Source Description", info="What does the data source contain, or what is the reference citation?")
52
- with gr.Row(elem_classes=["data-row"]):
53
- plugin_add_data_source = gr.Button("Add Data Source")
54
-
55
- with gr.Accordion("Compatible Plugins",open=True,elem_classes=["plugin-accordion"]):
56
-
57
- gr.Markdown("## Input Plugins")
58
- gr.Markdown("List any known plugins that can provide input into your plugin")
59
-
60
- with gr.Row(elem_classes=["input-row"],variant="panel"):
61
- with gr.Column():
62
- # a url field for the registry page where the plugin can be found
63
- plugin_input_plugin_1 = gr.Textbox(placeholder="https://greensoftware.foundation/if/[ID]", label="Plugin URL", info="Enter the impact framework registry URL where the plugin can be found")
64
- with gr.Column():
65
- gr.Markdown("Alternatively, search for plugins that are compatible with your required inputs")
66
- # a button to help users find compatible plugins
67
- plugin_find_input_plugin = gr.Button("Find Compatible Plugins")
68
- gr.Button("Add Input Plugin")
69
-
70
- gr.Markdown("## Dependent Plugins")
71
- gr.Markdown("List any plugins that can utilize the output of your plugin")
72
-
73
- with gr.Row(elem_classes=["output-row"],variant="panel"):
74
- with gr.Column():
75
- plugin_output_plugin_1 = gr.Textbox(placeholder="https://greensoftware.foundation/if/[ID]", label="Plugin URL", info="Enter the impact framework registry URL where the plugin can be found")
76
- with gr.Column():
77
- gr.Markdown("Alternatively, search for plugins that are compatible with your output")
78
- plugin_find_output_plugin = gr.Button("Find Compatible Plugins")
79
- gr.Button("Add Output Plugin")
80
 
81
  gr.Button("Submit Plugin",variant="primary")
82
 
@@ -85,4 +62,4 @@ with gr.Blocks(css=css) as registry_submit:
85
  #btn = gr.Button("Run")
86
  #btn.click(fn=update, inputs=inp, outputs=out)
87
 
88
- registry_submit.launch()
 
6
  }
7
  """
8
 
9
+ with gr.Blocks(css=css) as pipeline_builder:
10
+ gr.Markdown("# 🚰 Impact Framework Pipeline Builder")
11
+ gr.Markdown("Visually construct your Impact Framework manifest file pipeline with this helpful interface.")
12
+
13
+ gr.Markdown("## Plugin Selector")
14
+ plugin_selector = gr.Dropdown(["Watt-Time","CO2.js","TDP Finder","Cloud Metadata"], label="Plugin",value="Cloud Metadata",interactive=True,info="Plugins available on the Impact Framework Registry")
15
+
16
+ with gr.Accordion("Chosen Plugin",open=True,elem_classes=["plugin-accordion"]):
17
+ gr.Markdown("## Cloud Metadata")
18
+ with gr.Row(variant="panel"):
19
+ plugin_input_1 = gr.Dropdown(["AWS","GCP","Azure","Other"], label="Cloud Vendor", info="Where is your data hosted?",interactive=True,value="AWS")
20
+ plugin_input_2 = gr.Dropdown(["C5 Metal","d3.xlarge","m5.large"], label="Cloud Instance", info="Wnat cloud instance is your server using?",interactive=True,value="m5.large")
21
+ with gr.Row():
22
+ plugin_input_finder_btn = gr.Button("Help me find my inputs")
23
+
24
+ with gr.Accordion("Find your cloud metadata inputs",open=True,elem_classes=["plugin-accordion"]):
25
+
26
+ plugin_input_finder_url = gr.Textbox(placeholder="https://[your_website.com]", label="Your website URL", info="If you are measuring energy based on a hosted website, enter the URL")
27
+ gr.Markdown("### <center>- OR -</center> ")
28
+
29
+ plugin_input_finder_host = gr.Dropdown(["AWS","GCP","Azure","Other"], label="Cloud Vendor", info="Where is your data hosted?",interactive=True,value="AWS")
30
+ plugin_input_finder_servers = gr.Dropdown(["uswest-3","a1.xl"], label="Select an Instance", info="Your instance is the machine type your website is being run with",interactive=True,value="uswest-3")
31
+ with gr.Row():
32
+ plugin_input_finder_geolocate = gr.Button("Find My Location")
33
+
34
+ with gr.Accordion("Sample plugin outputs",open=True,elem_classes=["plugin-accordion"]):
35
+
36
+ gr.Markdown("### Plugin Output Format")
37
+
38
+ gr.Markdown("#### CPU/TDP")
39
+ with gr.Row(variant="panel"):
40
+ gr.Textbox(value=270,label="Amount")
41
+ gr.Textbox(value="Watts",label="Units")
42
+ gr.Textbox(value="CPU/GPU Heat Dissipation",label="ℹ️")
43
+
44
+ gr.Markdown("#### Memory")
45
+ with gr.Row(variant="panel"):
46
+ gr.Textbox(value=432,label="Amount")
47
+ gr.Textbox(value="GB",label="Units")
48
+
49
+ gr.Markdown("#### Processor")
50
+ with gr.Row(variant="panel"):
51
+ gr.Textbox(value="Intel XEON 830C",label="type")
52
+
53
+ gr.Markdown("#### VCPUs")
54
+ with gr.Row(variant="panel"):
55
+ gr.Textbox(value="64 / 64",label="used / available")
56
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  gr.Button("Submit Plugin",variant="primary")
59
 
 
62
  #btn = gr.Button("Run")
63
  #btn.click(fn=update, inputs=inp, outputs=out)
64
 
65
+ pipeline_builder.launch()