Spaces:
Runtime error
Runtime error
merge conflict
Browse files
app.py
CHANGED
@@ -1,15 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import pandas as pd
|
4 |
-
import json
|
5 |
|
6 |
pd.options.plotting.backend = "plotly"
|
7 |
|
8 |
|
9 |
TITLE = "Diffusion Faces Cluster Explorer"
|
10 |
-
clusters_12 =
|
11 |
-
clusters_24 =
|
12 |
-
clusters_48 =
|
13 |
|
14 |
clusters_by_size = {
|
15 |
12: clusters_12,
|
@@ -60,6 +59,10 @@ def make_profession_table(num_clusters, prof_name):
|
|
60 |
prof_plot = df.plot(kind="bar", barmode="group")
|
61 |
return prof_plot
|
62 |
|
|
|
|
|
|
|
|
|
63 |
|
64 |
with gr.Blocks() as demo:
|
65 |
gr.Markdown("# 🤗 Diffusion Cluster Explorer")
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import pandas as pd
|
|
|
4 |
|
5 |
pd.options.plotting.backend = "plotly"
|
6 |
|
7 |
|
8 |
TITLE = "Diffusion Faces Cluster Explorer"
|
9 |
+
clusters_12 = pd.read_json("clusters/professions_to_clusters_12.json")
|
10 |
+
clusters_24 = pd.read_json("clusters/professions_to_clusters_24.json")
|
11 |
+
clusters_48 = pd.read_json("clusters/professions_to_clusters_48.json")
|
12 |
|
13 |
clusters_by_size = {
|
14 |
12: clusters_12,
|
|
|
59 |
prof_plot = df.plot(kind="bar", barmode="group")
|
60 |
return prof_plot
|
61 |
|
62 |
+
def gen_df(num_clusters,model,profs):
|
63 |
+
if num_clusters == 12:
|
64 |
+
print(clusters_12.head())
|
65 |
+
|
66 |
|
67 |
with gr.Blocks() as demo:
|
68 |
gr.Markdown("# 🤗 Diffusion Cluster Explorer")
|