Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1611,7 +1611,7 @@ def read_ai_dataset_selection():
|
|
| 1611 |
def create_trust_score_1():
|
| 1612 |
score = 8.5
|
| 1613 |
max_score = 10
|
| 1614 |
-
fig, ax = plt.subplots(figsize=(
|
| 1615 |
values = [score, max_score - score]
|
| 1616 |
ax.pie(values, colors=["#4CAF50", "#C0C0C0"], startangle=90, counterclock=False, wedgeprops=dict(width=0.2))
|
| 1617 |
|
|
@@ -1623,7 +1623,7 @@ def create_trust_score_1():
|
|
| 1623 |
def create_trust_score_2():
|
| 1624 |
score = 7.5
|
| 1625 |
max_score = 10
|
| 1626 |
-
fig, ax = plt.subplots(figsize=(
|
| 1627 |
values = [score, max_score - score]
|
| 1628 |
ax.pie(values, colors=["#4CAF50", "#C0C0C0"], startangle=90, counterclock=False, wedgeprops=dict(width=0.2))
|
| 1629 |
|
|
@@ -1632,6 +1632,7 @@ def create_trust_score_2():
|
|
| 1632 |
fig.suptitle('Trust Score 2', fontsize=6)
|
| 1633 |
return fig
|
| 1634 |
|
|
|
|
| 1635 |
def plot_to_numpy(fig):
|
| 1636 |
buf = io.BytesIO()
|
| 1637 |
fig.savefig(buf, format="png")
|
|
|
|
| 1611 |
def create_trust_score_1():
|
| 1612 |
score = 8.5
|
| 1613 |
max_score = 10
|
| 1614 |
+
fig, ax = plt.subplots(figsize=(0.5, 0.5), subplot_kw=dict(aspect="equal"))
|
| 1615 |
values = [score, max_score - score]
|
| 1616 |
ax.pie(values, colors=["#4CAF50", "#C0C0C0"], startangle=90, counterclock=False, wedgeprops=dict(width=0.2))
|
| 1617 |
|
|
|
|
| 1623 |
def create_trust_score_2():
|
| 1624 |
score = 7.5
|
| 1625 |
max_score = 10
|
| 1626 |
+
fig, ax = plt.subplots(figsize=(0.5, 0.5), subplot_kw=dict(aspect="equal"))
|
| 1627 |
values = [score, max_score - score]
|
| 1628 |
ax.pie(values, colors=["#4CAF50", "#C0C0C0"], startangle=90, counterclock=False, wedgeprops=dict(width=0.2))
|
| 1629 |
|
|
|
|
| 1632 |
fig.suptitle('Trust Score 2', fontsize=6)
|
| 1633 |
return fig
|
| 1634 |
|
| 1635 |
+
|
| 1636 |
def plot_to_numpy(fig):
|
| 1637 |
buf = io.BytesIO()
|
| 1638 |
fig.savefig(buf, format="png")
|