Spaces:
Runtime error
Runtime error
Commit
·
290a376
1
Parent(s):
ba5ac54
up
Browse files
app.py
CHANGED
@@ -108,12 +108,13 @@ def retrieve_dataframes(
|
|
108 |
sorted(results.items(), key=lambda item: (item[1] is None, item[1]))
|
109 |
)
|
110 |
all_datasets_results[dataset][metric][lang] = [
|
111 |
-
f"{
|
112 |
]
|
113 |
|
114 |
data = all_datasets_results[dataset][metric]
|
115 |
data_frame = pd.DataFrame.from_dict(data, orient="index")
|
116 |
data_frame.fillna("", inplace=True)
|
|
|
117 |
pandas_datasets[dataset][metric] = data_frame
|
118 |
return pandas_datasets
|
119 |
|
@@ -152,13 +153,19 @@ iface = gr.Interface(
|
|
152 |
list(all_metrics), type="value", default="wer", label="metric"
|
153 |
),
|
154 |
],
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
examples=[
|
157 |
["mozilla-foundation/common_voice_7_0", "wer"],
|
158 |
["mozilla-foundation/common_voice_7_0", "cer"],
|
159 |
],
|
|
|
160 |
)
|
161 |
|
162 |
-
iface.test_launch()
|
163 |
-
|
164 |
iface.launch()
|
|
|
108 |
sorted(results.items(), key=lambda item: (item[1] is None, item[1]))
|
109 |
)
|
110 |
all_datasets_results[dataset][metric][lang] = [
|
111 |
+
f"{v} : {k}" for k, v in results.items()
|
112 |
]
|
113 |
|
114 |
data = all_datasets_results[dataset][metric]
|
115 |
data_frame = pd.DataFrame.from_dict(data, orient="index")
|
116 |
data_frame.fillna("", inplace=True)
|
117 |
+
data_frame = data_frame.transpose()
|
118 |
pandas_datasets[dataset][metric] = data_frame
|
119 |
return pandas_datasets
|
120 |
|
|
|
153 |
list(all_metrics), type="value", default="wer", label="metric"
|
154 |
),
|
155 |
],
|
156 |
+
gr.outputs.Dataframe(
|
157 |
+
headers=None,
|
158 |
+
max_rows=3,
|
159 |
+
max_cols=50,
|
160 |
+
overflow_row_behaviour="paginate",
|
161 |
+
type="pandas",
|
162 |
+
label=None,
|
163 |
+
),
|
164 |
examples=[
|
165 |
["mozilla-foundation/common_voice_7_0", "wer"],
|
166 |
["mozilla-foundation/common_voice_7_0", "cer"],
|
167 |
],
|
168 |
+
layout="vertical",
|
169 |
)
|
170 |
|
|
|
|
|
171 |
iface.launch()
|