Ilyas KHIAT
commited on
Commit
·
b0c72d5
1
Parent(s):
9763683
emission export fin fin
Browse files- empreinte_carbone.py +1 -1
- empreinte_export.py +2 -2
empreinte_carbone.py
CHANGED
|
@@ -97,7 +97,7 @@ def display_carbon_footprint():
|
|
| 97 |
pourcentage_api = emission_api / total_emission
|
| 98 |
pourcentage_serveur = serveur_emission / total_emission
|
| 99 |
|
| 100 |
-
df = pd.DataFrame({"
|
| 101 |
base=alt.Chart(df).encode(
|
| 102 |
theta=alt.Theta(field="valeur", type="quantitative", stack=True),
|
| 103 |
color=alt.Color(field="Catégorie", type="nominal")
|
|
|
|
| 97 |
pourcentage_api = emission_api / total_emission
|
| 98 |
pourcentage_serveur = serveur_emission / total_emission
|
| 99 |
|
| 100 |
+
df = pd.DataFrame({"Catégorie": ["Identification + dessin","Dialogue avec IA (extraction pp + dialogue)"], "valeur": [pourcentage_serveur, pourcentage_api]})
|
| 101 |
base=alt.Chart(df).encode(
|
| 102 |
theta=alt.Theta(field="valeur", type="quantitative", stack=True),
|
| 103 |
color=alt.Color(field="Catégorie", type="nominal")
|
empreinte_export.py
CHANGED
|
@@ -122,10 +122,10 @@ def get_carbon_footprint_html():
|
|
| 122 |
pourcentage_api = emission_api / total_emission
|
| 123 |
pourcentage_serveur = serveur_emission / total_emission
|
| 124 |
|
| 125 |
-
df = pd.DataFrame({"
|
| 126 |
base = alt.Chart(df).encode(
|
| 127 |
theta=alt.Theta(field="valeur", type="quantitative", stack=True),
|
| 128 |
-
color=alt.Color(field="
|
| 129 |
)
|
| 130 |
|
| 131 |
pie = base.mark_arc(outerRadius=100)
|
|
|
|
| 122 |
pourcentage_api = emission_api / total_emission
|
| 123 |
pourcentage_serveur = serveur_emission / total_emission
|
| 124 |
|
| 125 |
+
df = pd.DataFrame({"Catégorie": ["Identification + dessin", "IA (extraction pp + dialogue)"], "valeur": [pourcentage_serveur, pourcentage_api]})
|
| 126 |
base = alt.Chart(df).encode(
|
| 127 |
theta=alt.Theta(field="valeur", type="quantitative", stack=True),
|
| 128 |
+
color=alt.Color(field="Catégorie", type="nominal")
|
| 129 |
)
|
| 130 |
|
| 131 |
pie = base.mark_arc(outerRadius=100)
|